Calendar problems.

| No Comments | No TrackBacks
People please stop writing your own damned programs to deal with dates and times, or at least make them use standard mechanisms to determine if you've got a valid date of the month.
There are 29 days in the month of February in a leap year. Leap years happen every 4 years, but specifically don't happen on years that are divisible by 100, but not by 400. So 1900 wasn't a leap year. 2000 was, 2004 was and 2008 is.
If you need to check if a date is valid you need the day of the month, the month and the full year (i.e. 1900, 1999, 2000, 2004). Using a 2 digit year is tantamount to the Y2k problem.

No TrackBacks

TrackBack URL: http://www.petesh.com/scgi-bin/MT/mt-tb.cgi/150

Leave a comment

About this Entry

This page contains a single entry by Pete Shanahan published on March 4, 2008 10:18 AM.

Bizarre wireless issue was the previous entry in this blog.

Oh my god. I am complaining again is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.