.APPENDIX....: Fdate's Leap Year Algorithm
.ALIAS.......: LYALGOL
.DISCUSSION..:
Here is how Fdate decides whether or not a year is a leap year.
Every year evenly divisible by 4 IS a leap year
EXCEPT THAT
Every year evenly divisible by 100 IS NOT a leap year
EXCEPT THAT
Every year evenly divisible by 400 IS a leap year.
Using this algorithm:
1983 is not a leap year
1984 is a leap year
1900 is not a leap year
2000 is a leap year
See "A Machine Algorithm for Processing Calendar Dates", by Henry F. Fliegel
(Georgetown University Observatory) and Thomas C. Van Flandern (U.S. Naval
Observatory) COMMUNICATIONS OF THE ACM, Volume 11, Number 10, October 1968
There is supposedly a new adjustment to the leapyear algorithm, which
specifies the additional exception:
EXCEPT THAT
Every year evenly divisible by 4000 IS a leap year
See "Bit By Bit" column, COMPUTER LANGUAGE, November 1989, p. 148. This
adjustment is not part of FDATE's leapyear algorithm. Unless your
application is working with dates 2,000 years in the future, the lack of this
exception will be irrelevant for you.