11-20-2004, 05:50 PM
Quote:Dark Ninja, your code for testing whether a year is a leap year is incorrect. The definition of a leap year (they added something to it, but I can't remember what) is:Code:IF year / 4 = INT(year / 4) THEN
Leapyear
#1. Factor of 4
#2. Not a factor of 100
#3. Rule 2 drops if year is factor of 400
So, the proper code would be:
Code:
LeapYear = ((Year MOD 4 = 0 AND Year MOD 100 <> 0) OR (Year MOD 400 = 0))
IF LeapYear THEN blablabla
Hope you can do something with it
EDIT:
Oh and:
Code:
IF day < 28 OR