Y2K: A Perspective From an Amateur Astronomer Who's a Computer Programmer

© 1999 by Robert C. Moler

Well, it's only 4 months away: The Big 2-0-0-0. It seems some of the early hysteria has died down. However, as January 1st nears I suspect that apprehension will build again.

The acronym Y2K means "Year 2000". The problem is also misnamed by some the Millennium Bug, It has nothing to do with the millennium, but the two digit rollover of a century. Had computers been invented a hundred years ago there'd have been a Y1.9K bug in 1900 that would've actually been worse than Y2K. I'll get back to that in due course.

The selection of next year as the year numbered 2000 is completely arbitrary and has nothing to do with the earth, solar system or universe at large. I will refer you to the article in the January 1999 S.S.: M Minus 2. It appears to be incorrect at what it's supposed to represent, the Year of Our Lord (AD) Jesus was probably born in 6 or 2 BC. The 2,000th anniversary of those events being in the spring of 1995 or 1999 respectively. Come to the December GTAS meeting to find out why.

While astronomers have determined the length of the year they have no say in the numbering scheme, or when the year starts.

The Y2K problem comes from storing dates with 2 digit years. It's nice, short, and how people write dates. However it doesn't fare well when we near the end of a century.

Add 1 to 99 and you get 00 if you only work with 2 digits. Your 1st grade teacher may not accept this answer, but a computer will. Obviously if you're comparing dates to compute interest the 2 digit year rollover could be a problem.

There's a couple of ways to handle this problem. One, convert all files and programs in a system to store and use 4 digit dates. Second, change the way dates are handled to assume certain years are in the 21st century and the rest in the 20th. The second method is called windowing. In a 4 digit field move in the 2 digit year. If, say it is between 50 and 99, add 1900 to it. If between 1 and 49, add 2000. To be totally practical, the window needs to shift with time.

As it is dates are hard to work with. They are neither decimal as we would like, or binary as the computer might like. A date as we use it contains three related but different quantities: month, day and year. Quick, subtract 12/4/1999 from 3/15/2004. While you're figuring that out, I'll give you the answer. 1,563 days or 51 months, 11 days. To solve this problem you and the computer have to go back to the ditty: "Thirty days has September..."

Once written a programmer tends to copy a complicated procedure into any subsequent program where its needed. So even new programs can have old date code that doesn't have year rollover code in it. There's nothing worse than trying to figure out and update someone else's date logic. I know, I've done it for the past several years. Also many date incrementing procedures tend to be just good enough to get by, which may mean problems when applied to different situations.

Another problem programmers have with the calendar is leap years. It's another item that has to be checked for year 2000 compatibility. I suppose there's some demented programmer somewhere who checks a table of years to determine which is a leap. I had to do it once in a network login script which was rather deficient in mathematical functions.

Usually one finds if the year is evenly divisible by 4. That works most of the time, but is the reason the Y1.9K problem would have been worse. 1900 is divisible by 4, but was not a leap year. In the Gregorian Calendar century years, those which end in 00, are only leap years if the are divisible by 400. See the article The Years of Our Lives from January 1997's SS for more information on the Gregorian Calendar. Both mentioned articles are also located on the Ephemeris Web Site. See the Planet Page for the address.

There are other critical dates that have to be tested for complete Y2K compliance. One is past. That's April 9, 1999, the 99th day of '99. The next is this month: 9/9/99. The next critical date is the big one: 1/1/00. After that there's 2/29/00, 2000 is a leap year. Then finally 10/10/2000. The reason for the days with 9s be critical is that we programmers use numeric fields of 9s to flag high dates or end sentinels. Of course a date 99/99/99 would not be confused in a computer with 9/9/99 which would really be stored as 09/09/99.

What all this will do to us on January 1st, 2000 isn't clear. Most utilities and financial institutions have tested, changed or replaced systems. What it means to the universe, whose age is many billions of years, is nothing. Well, maybe not nothing, but that some organisms, on some remote dust speck have managed to count to 2,000.

Questions? Comments? Send Email to me at bob@bjmoler.org

Uploaded: 08/16/01