By virtue of the "every-four-years" calendar rule taught in grade school, February has a 29th day. But this leap year is a piece of cake compared with the rapidly approaching year 2000, when two lesser-known calendar rules also kick in.
The original four-year rule was defined in 46 BC by Julius Caesar to adjust for the one-quarter day left over at the end of each year. An extra day was created every four years, thereby expanding the Julian Calendar from 365 to 366 days.
However, the length of the year isn't exactly 365.25 days but rather closer to 365.2422. By the 16th century, the resulting round-off error had accumulated to the point where the Roman Catholic Church became seriously concerned. Pope Gregory XIII was worried that religious holidays weren't being celebrated on exactly the right day. He commissioned an astronomer, Aloysius Lilius, and his brother to see how severe the problem had become. Their conclusion: The calendar was off by 10 days.
To correct the problem, Pope Gregory did two things: to eliminate future errors, he created two new leap-year rules -- a 100-year rule that excludes century years and a 400-year rule that reincludes them. In other words, 1900 wasn't a leap year, 2000 will be and 2100 won't be.
Then, Pope Gregory XIII decreed a "one-time correction" of 10 days. As a result, Thursday, October 4, 1582, was followed by Friday, October 15, 1582. All together, this is known as the Gregorian Calendar.
Naturally, not all countries adopted the standard at the same time. Great Britain and France reportedly spent years meeting each other, in battle, on unplanned and inopportune occasions. When Great Britain finally got around to adopting the standard in 1752, 11 days of error had accumulated (which explains why some reports said George Washington was born February 11 and others said he was born February 22).
Now it's likely that many companies will experience at least one leap-year glitch. If we can't handle simple date logic every four years, how can we expect to handle more complex logic in the year 2000, when all three leap-year rules come into play? Some programs only implement the four-year and 100-year rules and therefore won't recognise 2000 as a leap year. Other programs won't even bother looking because they check only for the hard-coded values of 88, 92 and 96, and not 00. Still, others will properly recognise 2000 as a leap year but will improperly assign February a very generous 30 days.
Of course, this is small potatoes compared with the well-known "year 2000 problem", which involves programs that interpret 00 as 1900. Our systems are riddled with a variety of faulty date logic of all sorts and much of it is going to get stress-tested in production in the next few years.
Because faulty calculations put our critical business systems at grave risk, we must always try to implement the best date logic possible. Date logic is the foundation on which many of our business systems are built. If we don't lay the foundation carefully, the systems may collapse. And I doubt that we'll get bailed out by papal decree.
Author: Michael A. Lips is president of TransCentury Data Systems
[Copyright 1996 Computerworld Today, IDG Communications Pty Ltd. All rights reserved.]
Search the whole Sedgley site |