home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!mojo.eng.umd.edu!russotto
- From: russotto@eng.umd.edu (Matthew T. Russotto)
- Subject: Re: Look before you Leap
- Message-ID: <1992Sep07.202932.17600@eng.umd.edu>
- Date: Mon, 07 Sep 92 20:29:32 GMT
- Organization: College of Engineering, University of Maryland, College Park
- References: <lanbtrINN8tj@pollux.usc.edu>
- Lines: 16
-
- In article <lanbtrINN8tj@pollux.usc.edu> suhler@pollux.usc.edu (Paul A. Suhler) writes:
- >A note for those writing programs that calculate future dates:
- >unless I'm mistaken, any year which is integrally divisible by 400
- >is NOT a leap year.
-
- You are mistaken. Provided you use dates between 1901 and 2099
- inclusive, the rule that a year is a leap year iff it is integrally
- divisible by 4 is correct. (probably explains why Mac dates start
- with 1904 rather than 1900). The whole rule is that a year is a leap
- year if it is divisible by 400, or divisible by 4 and not by 100.
-
- --
- Matthew T. Russotto russotto@eng.umd.edu russotto@wam.umd.edu
- Some news readers expect "Disclaimer:" here.
- Just say NO to police searches and seizures. Make them use force.
- (not responsible for bodily harm resulting from following above advice)
-