This paper deals with a Y2K problem that surfaces when a Sunday-starting week is used.
A normal year has 53 weeks, where 51 or 52 are "complete" weeks, and 1 or 2 are "incomplete" (or "partial"), since they start or finish in the prior or following year.
For example, 1999 has 53 weeks. The first week has two days in 1999: Friday, January 1 and Saturday, January 2. The last week has six days in 1999, and ends on Friday, December 31.
If there were only 364 days in a year, and if the year started on a Sunday, then every year would have exactly 52 weeks. However, we aren't that lucky, and no year ever has fewer than 53 weeks.
As fate would have it, the year 2000 has 54 weeks! The first week has one day: Saturday, January 1, and the 54th week has one day: Sunday, December 31. (see footnote #2 for why we called this a Y2K problem).
It turns out that a 54-week year happens once every 28 years, so the last time was 1972 ... well before the birth of many software packages now in common use.
A 54-week year wouldn't be a problem if programmers had been aware of it, but we've seen several programs which actually assume that the number of weeks in a year is always 53. This can cause two kinds of problems:
Invalid restrictions on data entry
We have seen code that checks user-entered week numbers, incorrectly restricting them to the range 1..53.
Run time aborts
If the code is written in range-checking language (e.g., Pascal), or if it uses the week number as an index into an array of 53 elements, the program could abort, or even worse, possibly pick up erroneous information and continue running.
This isn't just a theoretical problem, of course. We encountered it in source code we maintain for one of our clients. The team which found and characterized the problem consisted of Barry Lake and Michael Hensley
Company background: Allegro Consultants, Inc. has been working on Y2K issues for many years. We wrote the internal white paper which Hewlett-Packard used for the start of its Y2K efforts in HP-UX and MPE/iX. We also wrote HourGlass 2000 for the HP 3000 and HourGlass 2000 for the HP 9000, two date/time simulator tools.
Open Directory Project (ODP)
Yahoo Discussion about the ISO 8601 standard
List of countries which have adopted the ISO 8601 standard
The Mathematics of the ISO 8601 Calendar by R.H. van Gent
The Best of Dates, The Worst of Dates by Gilbert Healton
There are *many* other links to ISO 8601 information at the ODP site listed above.