[comp.sys.ibm.pc] Re^2: Will Your SW Make it to the year 2000?

leonard@bucket.UUCP (Leonard Erickson) (07/03/89)

hjg@amms4.UUCP (Harry Gross) writes:

>In article <4342@druhi.ATT.COM> terrell@druhi.ATT.COM (TerrellE) writes:
>>Will your software make it into the 21st century?  Does it cope with the
>>Gregorian calendar reform of the 16th century?
>	[stuff deleted]
>>The Gregorian calendar reform makes every year evenly divisible by 4 a
>>leap year EXCEPT for century years.  Consequently there is no January 29,
>							       ^^^^^^^
>>2000.

>Um - that ought to be February :-)  By the way, the proper determination
>is just a wee bit more than that stated above.  Specifically, a leap year
>exists if:

>		1) the year is divisible by 4 AND
>		2) the year is NOT divisible by 400

try:
  leap_year := (((year mod 4) = 0) and not ((year mod 100) = 0)) or
                ((year mod 400) = 0)

>thus, the years 1700, 1800 and 1900 were leap years, but 2000 will NOT be
>a leap year, and 2100 WILL be.

Exactly backwards. In 1700 *some* countries were still on the old calendar.
England and it's colonies didn't switch until September 1752. If your
system has 'cal', try 'cal 9 1752' for a rather interesting display!

1800 and 1900 were not leap years, even though several major packages think
differently. 2000 will be and this makes life much easier for programmers.

>On the other hand, does anyone really expect their software to be up and
>running in the year 2100? :-)

>By the same token, I expect that DOS will have been replaced by something
>else by the year 2000 (perhaps DOS 9.8 :-) and Microsoft and IBM will no
>doubt have fixed the problem in that release :-)

Ask people about the "epochs" on PDP systems. Nobody expected those systems
to be around this long either! And as I point out above, the software *isn't*
broken!
-- 
Leonard Erickson		...!tektronix!reed!percival!bucket!leonard
CIS: [70465,203]
"I'm all in favor of keeping dangerous weapons out of the hands of fools.
Let's start with typewriters." -- Solomon Short