Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site denelcor.UUCP
Path: utzoo!linus!philabs!seismo!hao!denelcor!lmc
From: lmc@denelcor.UUCP (Lyle McElhaney)
Newsgroups: net.general
Subject: Re: Date Algorithm
Message-ID: <288@denelcor.UUCP>
Date: Sun, 29-Jan-84 13:46:09 EST
Article-I.D.: denelcor.288
Posted: Sun Jan 29 13:46:09 1984
Date-Received: Tue, 31-Jan-84 02:04:43 EST
Organization: Denelcor, Aurora, CO
Lines: 16

Zeller's Congruence furnishes the day of the week for any date. For the
kth day of the mth month of the dth year of the cth century,

	f = (k + [2.6m - .2] + d + [d/4] + [c/4] - 2c ) mod 7

assuming:

	March is month 1, ... December is month 10, Jan and Feb are
	months 11 and 12 of the previous year.

	The square brackets are "greatest integer" truncation functions.

The result is 0 for Sunday, ... 6 for Saturday.
-- 
		Lyle McElhaney
		(hao,brl-bmd,nbires,csu-cs,scgvaxd)!denelcor!lmc