j4321 / tkcalendar

Calendar widget for Tkinter
https://pypi.python.org/pypi/tkcalendar
GNU General Public License v3.0
97 stars 33 forks source link

Leap year error #27

Closed bchip50 closed 6 years ago

bchip50 commented 6 years ago

Drop down displays 2/29/2000. This day didn't exist.

j4321 commented 6 years ago

Figuring out whether 2000 is a leap year or not is a bit tricky, it is an exception of an exception. According to Wikipedia:

Every year that is exactly divisible by four is a leap year, except for years that are exactly divisible by 100, but these centurial years are leap years if they are exactly divisible by 400. For example, the years 1700, 1800, and 1900 were not leap years, but the years 1600 and 2000 were.

So 2/29/2000 actually existed.