Jump to content

Leap year problem

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Littlepotato (talk | contribs) at 07:33, 7 March 2010 (New article, mainly translated from zh:閏年蟲). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Leap year bug (also known as the Leap year problem) is a problem for both digital (computer-related) and non-digital documentation and data storage situations which resulted from the wrong calculation of leap year.

Type

There are several types of leap year bugs.

  1. Some digital systems have ignored the existance of leap year. Therefore, when the date is February 29, the system would wrongly treat it as March 1.
  2. Some digital systems have wrongly calculated which years are leap year. The most well-known case occured in Sony's Playstation 3: The system treated 2010 as a leap year, so a non-exist date February 29, 2010 was shown on March 1, 2010, and caused program error.
  3. Most digital systems will face a leap year bug, known as 2100 problem. Although most years that are evenly divisible by 4 are leap years, years that are evenly divisible by 100 are not leap years (unless they are also evenly divisible by 400). Therefore, 2100 is not a leap year. If a system simply treat all years that are evenly divisible by 4 are leap years, a non-exist date February 29, 2100 will be shown on March 1, 2100.