Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!zaphod.mps.ohio-state.edu!wuarchive!uunet!mcsun!ukc!uos-ee!ee.surrey.ac.uk!R.Smithers From: R.Smithers@ee.surrey.ac.uk (Russell Smithers) Newsgroups: comp.lang.pascal Subject: Re: Leap year function Message-ID: <1991May24.120322.7004@EE.Surrey.Ac.UK> Date: 24 May 91 12:03:22 GMT References: <1991May17.074806.130@hls.com> <8BF621w164w@kaiki.toppoint.de> Sender: news@EE.Surrey.Ac.UK (Usenet News Service) Reply-To: R.Smithers@ee.surrey.ac.uk (Russell Smithers) Organization: University of Surrey, Guildford, England GU2 5XH. Lines: 15 neile@hls.com writes: > 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 And what's about 1900? That's n o t a leap year! ________________________________________________________________________ | Kai Voelcker, Kappelner Str 18, D-2300 Kiel 1, voice: +49 431 335605 | | kai@kaiki.toppoint.de interests: 386asm, c, pascal; OR algorithms | | >>> polite notice: I have to pay for incoming mail. Thanks <<< | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Actualy I saw something resantly about this exact problem i think it was c code but I noticed its not just mod 4 its a check with mod 100. Ill dont think I can find the artical any more but its not that much, its about 3 -4 lines of code max with an if else if I remember! Any way im sure someone else will post the answer.