Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!sample.eng.ohio-state.edu!purdue!haven.umd.edu!uvaarpa!vger.nsu.edu!g_harrison From: g_harrison@vger.nsu.edu (George C. Harrison, Norfolk State University) Newsgroups: comp.lang.pascal Subject: Re: Leap year function Message-ID: <1002.283822f3@vger.nsu.edu> Date: 20 May 91 23:26:43 GMT References: <26912@adm.brl.mil> <1991May17.074806.130@hls.com> <1991May18.112519.3371@monu0.cc.monash.edu.au> Lines: 43 In article <1991May18.112519.3371@monu0.cc.monash.edu.au>, ins845b@monu4.cc.monash.edu.au (mr k.l. lentin) writes: > In article <1991May17.074806.130@hls.com> neile@hls.com writes: >>In article <26912@adm.brl.mil>, bakerre@tawc1.eglin.af.mil (Baker, Robert E.) writes: >>> >>> I'm looking for source for a function that determines whether or not a >>> year is a leap year. Anybody got it. ADVthanksANCE. >>> >>The test for a leap year is simple; year mod 4 = 0. There is no reason to >>add complexity as indicated in other postings. >> >>Neil Everhart > > Not altogether true. All century years that are not multiples of 400 are NOT > leap years so 1600 IS a leap year 1700,1800,1900 WERE and 2000 will be! > If thats not a problem year mod 4 = 0 works fine. > > |/ > |\evin It really depends on the application. As a mathematician I'd like to see the total rule in effect, but consider this..... If the program was to run for the next 108 or so years continually, could the programmer be fired??? (assuming, of course, that the program was to determine the current day, etc. and not some day of the week that occured in history {before 1901}) I have a function which is really neat, but I am sure 1578 people have emailed it to him already. There are probably those who will post all date alterations (Julian calendar, etc.) since Adam and Eve and even since God first saw "that it was good." George.... -- George C. Harrison ----------------------- ----- Professor of Computer Science ----------------------- ----- Norfolk State University ----------------------- ----- 2401 Corprew Avenue, Norfolk, Virginia 23504 ----------------------- ----- INTERNET: g_harrison@vger.nsu.edu ---------------------------------