Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!jarthur!petunia!allanon!marcos From: marcos@allanon.UUCP (Marcos Della) Newsgroups: comp.lang.pascal Subject: Re: Leap year function Message-ID: Date: 23 May 91 03:32:54 GMT References: <8BF621w164w@kaiki.toppoint.de> Organization: Allanon's Bar & Grill Lines: 24 kai@kaiki.toppoint.de (Kai Voelcker) writes: > 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! how about changing it to the following: leap_year := (year MOD 4 = 0) AND ((year MOD 100 <> 0) OR (year MOD 400 = 0)); That should clear up the hundred and four hundred year problem... Marcos ____________________________________________________________________________ Marcos R. Della | Did you ever wonder if there was allanon!marcos@petunia.CalPoly.EDU (home) | more to the universe than this? mdella@polyslo.CalPoly.EDU (school) | marcos.della@f185.n125.z1.fidonet.org | ...I didn't...