Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!milton!reeses From: reeses@milton.u.washington.edu (Feltch Master) Newsgroups: comp.lang.pascal Subject: Re: Leap year function Message-ID: <1991May17.193530.25042@milton.u.washington.edu> Date: 17 May 91 19:35:30 GMT References: <26912@adm.brl.mil> <1991May17.074806.130@hls.com> Organization: Feltchers Anonymous Lines: 22 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 Yes, there is a need for complexity...years divisible by 100 that are not also divisible by 400 are not leap years. 1900 was not a leap year, despite the fact that it was divisible by 4. 2000 will be, as will 2400, as will 2800, etc. Art Taylor -- ------------------------------------------------------------------------------- reeses@milton.u.washington.edu University of Washington, Seattle "Reality is a cop-out for people who can't handle drugs"