From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10db24,37e6dbf5e31f6da0 X-Google-Attributes: gid10db24,public X-Google-Thread: ff6c8,37e6dbf5e31f6da0 X-Google-Attributes: gidff6c8,public X-Google-Thread: 103376,37e6dbf5e31f6da0 X-Google-Attributes: gid103376,public X-Google-Thread: 1108a1,37e6dbf5e31f6da0 X-Google-Attributes: gid1108a1,public X-Google-Thread: f43e6,37e6dbf5e31f6da0 X-Google-Attributes: gidf43e6,public From: "Norman H. Cohen" Subject: Re: Software Engineering News Brief Date: 1996/11/07 Message-ID: <32824912.353C@watson.ibm.com>#1/1 X-Deja-AN: 195137346 references: <55nqea$32a@news2.delphi.com> <3280BAFA.1B2F@email.mot.com> content-type: text/plain; charset=us-ascii organization: IBM Thomas J. Watson Research Center mime-version: 1.0 reply-to: ncohen@watson.ibm.com newsgroups: comp.lang.ada,comp.sw.components,comp.object,comp.software-eng,comp.edu x-mailer: Mozilla 3.0 (Win95; I) Date: 1996-11-07T00:00:00+00:00 List-Id: Tom Reid wrote: > Let me see if I have this right. Ada does not have a year 2000 problem > but it does have a year 2100 problem (not that this will affect any of > us). > > Anyone know why they didn't make it a span of 255 years and not waste > digits? They had a different microoptimization in mind :-). Years range from 1901 to 2099 in the standard Ada calendar package to slightly simplify the determination of whether a given year is a leap year. (Within that range a year is a leap year if and only if it is divisible by four. In contrast, the years 1900 and 2100 are both divisible by four, but are not leap years.) (Your comment about not wasting bits seems to presume that time is represented with a byte devoted to representing the year. Other representations are possible, e.g. representing a time in terms of the number of seconds elapsed since the start of 1970.) -- Norman H. Cohen mailto:ncohen@watson.ibm.com http://www.research.ibm.com/people/n/ncohen