Article View: news.software.b
Article #4725Re: getdate.y and 1999
From: Doug Sewell
Date: Wed, 30 Dec 1992 19:49
Date: Wed, 30 Dec 1992 19:49
22 lines
1625 bytes
1625 bytes
Jay Maynard (jmaynard@oac.hsc.uth.tmc.edu) wrote: : In article <1992Dec30.174457.29401@nntpserver.chevron.com> hdnea@usho92.hou281.chevron.com (David Neal) writes: : >I was mucking around with getdate, and noticed : >it won't take dates > 1999. Anyone know why? I hate to : >just patch it and blow its leap year handling all to hell. : Actually, if it's using a year mod 4 leap year algorithm, it'll do fine for : 2000 - as 2000 is a leap year. 2100, on the other hand, may be a problem... Yes. Even though year 2000 is divisible by 100 (so it wouldn't ordinarily be a leap year), it's divisible by 400, so it is a leap year after all. So, 2000 can be treated just like 1992, 1996, and 2004. The source code (370 assembler) for the Snobat 1.9 implementation of Snobol4 has a note to the effect "This code will work until January 1, 2100. If you're still using it then, the joke's on you". -- Doug Sewell, Tech Support, Computer Center, Youngstown State University doug@cc.ysu.edu doug@ysub.bitnet <internet>!cc.ysu.edu!doug cat core | uuencode bunny.dropping | mail jp@tygra.michigan.com
Technical Details
Message-ID:
<1992Dec30.194905.19891@news.ysu.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!gatech!darwin.sura.net!zaphod.mps.ohio-state.edu!malgudi.oar.net!news.ysu.edu!do-not-reply-to-pathReferences:
<8246@lib.tmc.edu>Show Full Headers
Complete Article Headers
Newsgroups: news.software.b Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!darwin.sura.net!zaphod.mps.ohio-state.edu!malgudi.oar.net!news.ysu.edu!do-not-reply-to-path From: doug@cc.ysu.edu (Doug Sewell) Subject: Re: getdate.y and 1999 Message-ID: <1992Dec30.194905.19891@news.ysu.edu> Sender: news@news.ysu.edu (Usenet News Admin) Nntp-Posting-Host: unix1.cc.ysu.edu Organization: Bush in 92 ? NOT! X-Newsreader: TIN [version 1.1 PL8] References: <8246@lib.tmc.edu> Date: Wed, 30 Dec 1992 19:49:05 GMT Lines: 22