SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Technology Stocks : Y2K (Year 2000) Stocks: An Investment Discussion -- Ignore unavailable to you. Want to Upgrade?


To: David Eddy who wrote (9404)2/9/1998 1:34:00 PM
From: Hoatzin  Respond to of 13949
 
David,

I had similar thoughts when I read that article.

Here's a chunk of code I came across a while back.
It defines the format of a date field on a screen, and has some rules about what is and is not a valid date.
Without looking at the rest of the program, let's assume that there are no other y2k problems.
At least the program will allow "00" as a valid year, so far so good. But you will NOT be able to input "02/29/00",
since "00" is not in the list of valid leap years.
There is NO mistaking 2000 for 1900 (although we don't know what
the effects of this two-digit year might be later on in the program), this just bad design
(are common date routines that hard to use?) and sloppy code.

01 WS-MAP-DATE-FORMAT.
05 WS-MAP-DATE-MM PIC XX VALUE SPACES.
88 VALID-MONTH VALUES '01' THRU '12'.
88 28-DAY-MONTH VALUE '02'.
88 30-DAY-MONTH VALUES '04' '06' '09' '11'.
88 31-DAY-MONTH VALUES '01' '03' '05' '07' '08' '10' '12'.
05 WS-MAP-DATE-DD PIC XX VALUE SPACES.
88 VALID-DAY VALUES '01' THRU '31'.
05 WS-MAP-DATE-YY PIC XX VALUE SPACES.
88 VALID-YEAR VALUES '00' THRU '99'.
88 LEAP-YEAR VALUES '04' '08' '12' '16' '20' '24' '28'
'32' '36' '40' '44' '48' '52' '56' '60' '64' '68' '72'
'76' '80' '84' '88' '92' '96'.

Got any tools to fix this one automatically?

Kevin



To: David Eddy who wrote (9404)2/9/1998 3:12:00 PM
From: Jeffrey S. Mitchell  Respond to of 13949
 
David, FYI, I cut out part of the NY Times article to avoid copyright problems. Here is part of the part I edited out:

=====

The shorthand rule for leap years is that they come once every four years, like 1992 and 1996, to make up for the fact that the earth takes 365 and one-quarter days to get around the sun. Julius Caesar set up the system in the year we now call 46 B.C.

Nature is not so neat, though, and the earth moves 11 minutes, 14 seconds faster every year than Julius Caesar planned. This became obvious in the 1500s; by the time of Pope Gregory XIII, the vernal equinox was occurring on March 11 instead of March 21. He ordained that 10 days be dropped from the calendar and that leap years not be observed in years ending in 00, unless that year is evenly divisible by 400.

His system, known as the Gregorian calendar, however, led to a long period of confusion. Some countries adopted it immediately and others stuck to the Julian calendar, in which dates fell 10 days earlier, so that traveling from country to country meant adjusting the calendar the way that people adjust their watches now when traveling among time zones. By contrast, the year 2000 problem seems benign.

=====

Yeah, I know it doesn't make a difference to your argument; I just thought you might be interested in seeing some of what I cut out. (gg)

- Jeff