April 19, 2014

Y2K and Linux - page 5

In the Beginning...

  • January 1, 1999
  • By Lou Grinzo
While not a Y2K problem, another date-handling situation involves the fact that 2000 is a leap year, and some programs get this fact wrong. (A quick check of the documentation for one of Microsoft's programming tools showed two places where leap years were calculated incorrectly in sample code.) The problem is that some programs only use the "4-year" and "100-year" rules (years divisible by 4 are leap years, unless they're divisible by 100), and not the "400-year" rule (which says that a year divisible by 400 is indeed a leap year, after all).

It appears that this problem is far less prevalent and less disruptive than the Y2K bug. Still, if you routinely do things like calculate the number of days between two dates (which could be off by one if the range includes Feb. 29, 2000), it's worth checking the software you use for these tasks to make sure it doesn't have a problem.

Sitemap | Contact Us