|
YearZero
What to do about year 0?
Phase-Design The Gregorian calendar has no year 0. It skips from 1 AD straight to 1 BC (which is why people argued that 2001 was the real millennium). Rather than introduce a discontinuity, tm.tm_year == 0 will mean 1 BC, tm.tm_year == -1 will be 2 BC and so on. RationaleThis follows the Astronomical Year Numbering scheme which is the sanest standard I've found that deals with the problem. C99 and POSIX 1003.1 are silent on this point, but since tm.tm_year is defined as a signed integer and just "years since 1900" they have no restriction on year 0, but they also don't say what it means. ISO 8601 is ambiguous on this point. ISO 8601 only officially goes back to year 0 but "values in the range [0000] through [1582] shall only be used by mutual agreement of the partners in information interchange" (ISO 8601-2004E 4.1.2.1). They also allow negative years, again by "mutual agreement" (4.4.3.3). |