Article View: comp.sys.mac
Article #4178Re: Week DAYS (was Re: why 1904? ms excel)
From: Barry Margolin
Date: Thu, 07 Sep 1989 16:24
Date: Thu, 07 Sep 1989 16:24
18 lines
1250 bytes
1250 bytes
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
Technical Details
Message-ID:
<28974@news.Think.COM>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!bionet!ig!ames!think!barmarReferences:
<457a7553.1285f@maize.engin.umich.edu> <8909061947.AA00416@vs04csc.UMD.EDU> <972@mrsvr.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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