well, the previous is of course built after the leap year rules of the julian calendar which are in the mean time obsolete (since 1564 to be precise)
New rules after pope Gregor:
Leap Year Rules
"Concerning the solar year and types of years.
And concerning the leap year." May 29, 1564
There is a leap year every year whose number is perfectly divisible by four - except for years which are both divisible by 100 and not divisible by 400.
Source: http://www.wwu.edu/skywise/leapyear.html
Please consider adding a few testcases:
2400/02=2400/02/29
2100/02=2100/02/28
In the mean time I'll adapt my code to fit the rules
Edited by Jochen (2011-10-24 09:56 AM)
_________________________