home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / mac / programm / 15096 < prev    next >
Encoding:
Text File  |  1992-09-08  |  1.2 KB  |  27 lines

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