Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!bionet!ig!ames!think!barmar From: barmar@think.COM (Barry Margolin) Newsgroups: comp.sys.mac Subject: Re: Week DAYS (was Re: why 1904? ms excel) Message-ID: <28974@news.Think.COM> Date: 7 Sep 89 16:24:54 GMT References: <457a7553.1285f@maize.engin.umich.edu> <8909061947.AA00416@vs04csc.UMD.EDU> <972@mrsvr.UUCP> Sender: news@Think.COM Reply-To: barmar@kulla.UUCP (Barry Margolin) Organization: Thinking Machines Corporation, Cambridge MA, USA Lines: 18 In article <972@mrsvr.UUCP> hallett@shoreland.UUCP (Jeff Hallett x4-6328) writes: >Interesting. One thing I've always wondered about, though, is, given >a date in the Gregorian calendar, how does one determine the day of >the week? I don't know the formula offhand, but I believe it's called "Zeller's Congruence". It's a weird-looking, one-line formula that will calculate the day of the week. However, it's probably not much better than the brute force approach. It's less clear and it requires floating point or decimal arithmetic, whereas the brute force approach only needs integer arithmetic. Barry Margolin Thinking Machines Corp. barmar@think.com {uunet,harvard}!think!barmar