Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!mit-eddie!rassilon From: rassilon@eddie.MIT.EDU (Brian Preble) Newsgroups: comp.sys.ibm.pc Subject: Re: Will Your SW Make it to the year 2000? Message-ID: <12074@eddie.MIT.EDU> Date: 26 Jun 89 04:29:43 GMT References: <4342@druhi.ATT.COM> <972@ultb.UUCP> Reply-To: rassilon@eddie.MIT.EDU (Brian Preble) Organization: MIT, EE/CS Computer Facilities, Cambridge, MA Lines: 30 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? > >I was amused to find that allegedly state of the art scheduling software, >TimeLine, is broken for the year 2000. So is MS DOS. > >The Gregorian calendar reform makes every year evenly divisible by 4 a >leap year EXCEPT for century years. Consequently there is no February 29, >2000. Slight correction, every year evenly divisible by 4 and not on a century mark UNLESS evenly divisible by 400. This means that February 29, 2000 is valid, but February 29, 2100 is not. The conditional code to determine if a given year is a leap year looks like this: In "C": ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0) In Pascal: ((year MOD 4 = 0) AND (year MOD 100 <> 0)) OR (year MOD 400 == 0) Shar and Enjoy! Rassilon (Brian Preble) UUCP: ...!mit-eddie!rassilon Internet: rassilon@eddie.mit.edu Moderator: dave-barry@eddie.mit.edu