Working on Y2K and other date problems, I found two such dealing with Leap Day 2000 using a program called ObjectView.
[list=a][li]The GUI/Database interface program ObjectView had a simple function called getdate() which returned a string in the format MM/DD/YY or MM/DD/YYY, the latter being for dates in the 2000’s (E.g., on Oct. 29, 2000, it would return 10/29/100). But if the PC date was 2/29/2000, the function returned a zero-length string. (Obviously, they only employed part of the Gregorian calendar rules.) This played havoc with a lot of our project’s functionality.[/li]
Users weren’t supposed to enter dates later than today for most date fields. To check dates, we compared them to the date from getdate(). But since every string is greater than “”, every date entered on 2/29 was declared invalid.
[li]For inserting dates into the database, we’d call a function called convertdate() with parameters specifying the date in MM/DD/YY(Y) and a return string format of DD-MON-YYYY. If the year was under 100, it was assumed to be in this century*; greater than or equal to 100 was in the next century.[/li]
“This” and “next” were relative terms, though. So in this century (1900’s), the dates came out fine; if you passed convertdate() “04/04/108”, 04-Jul-2008 would be returned. But if the PC clock was set past 1/1/2000, the same function call would return 04-Jul-2108! (“10/29/99” would return “29-Oct-2099” because 99 was in “this” century [2000’s]) So passing it “02/29/100” (which we couldn’t get until I wrote a work-around for getdate()) in the next century made it return “29-Feb-2100”. But since this is not a valid date, Oracle rejected it when it was submitted for insert.[/list=a]
*** - When I say century, I am referring to the nn-hundreds type of century; e.g., the 1900’s, 2000’s.**
P.S. - The year 2000 is going to be a slow, quiet year, because everyone is saying that every event is the last of its kind in the 20th century. Since the 20th doesn’t end until 12/31/2000, we’ll have 12 months to recover from the Y2K riots.