Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!caen!uwm.edu!lll-winken!Firewall!ddsw1!infopls!hoffmann From: hoffmann@infopls.chi.il.us (Robert Hoffmann) Newsgroups: comp.lang.pascal Subject: Re: Leap year function Message-ID: Date: 19 May 91 01:38:18 GMT References: <1991May17.074806.130@hls.com> Organization: INFOPLUS support, Wheeling, IL Lines: 16 neile@hls.com 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. Sure there is. Several hundred years ago, the rules for century years (ones ending in 00) were changed... deleting 3 leap years every 400 years helps keep the calendar intact and the seasons happening on the right dates... If (year mod 100) = 0, then if (year mod 400) <> 0, it's not a leap year. That's why the complexity...