Allow me to give a couple of key sources for Zeller's algorithm to find the day of the week: nr = (k + floor((13*m-1)/5) + D + floor(D/4) + floor(C/4) - 2*C) mod 7 k: day of the month. m: month number shifted by -2; March = 1, April = 2, January = 11 of year-1, February = 12 of year-1. D: year mod 100, or the last two digits of the year. C: year div 100, or the century; at the moment C = 20. nr is an integer from 0 to 6. 0 corresponds to Sunday, 1 to Monday etcetera. Source: Ask Dr. Math: FAQ, 'The Calendar and the Days of the Week' http://forum.swarthmore.edu/dr.math/faq/faq.calendar.html Other source: 'Weekday -- from Eric Weisstein's Treasure Trove of Astronomy', Eric W. Weisstein and Wolfram Research http://www.treasure-troves.com/astro/Weekday.html Zeller's formula works only for Gregorian dates. Astronomers first convert any date (Julian, Gregorian) to the Julian date number. This number mod 7 gives the day of the week; 0 = Sunday, 1 = Monday, etc. Source: Astronomical algorithms, J. Meeus, Willmann-Bell, Chapter 7. Oscar van Vlijmen 2000-10-04
A calendar application download for the macintosh is available at http://www.chesco.com/~nicks. One can pay if one wishes. -- ------------------------------------------------------------ Infinity Software nicks@chesco.com http://www.chesco.com/~nicks -----BEGIN PGP PUBLIC KEY BLOCK----- Version: PGPfreeware 5.0 for non-commercial use <http://www.pgp.com> mQGiBDdoMKoRBADcw8/3TTYvqLt9X2QXixoLX53ogj7gz3SbiWG49GBniARxq8Xd lRnq3Qq+k4vxsCVCtYRHidbXsRK9BkRgiVfvcJy/JpL/h1V2H2OSrc1Ks0KjUX2v Gb5AWPAg5WVcrNb2xUY5dcjmCRGUi/iXKtwnc+SmhVlM+dzDrbUtw3G9mwCg/4k5 5gkSJnmYEAdaN173UaYD+1cD/3YX/jrVfLD6N6zgFyMxmF/VeL0M1LgqLSw6PfM1 zVyMEHeOZzctgKic9re+r8HQa48b3cUR3zCV/ckt9RHDVqR6qCXmdsJtWKbHP0s+ 8LieGnws9L8nq2lmqDN4PYhHHm7BGToNrZrpdZWGO3vAq8FMiKUPp9nJY3rcTQs5 y6R6A/91Z7YdhpOdiQy2IMZZh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6/LGQO3SYOTBze8rGAxiKEnD7XTKY+6U0X2hSIFMnl9nRP HUkl+/hyyns/b4SpsdM1lv1Sfl9BOCP6ygLV+T6kbThLnCHRtRFQCUDd2R8a3PiH VMetJrYhj6AAIE42Gmuqibeqw1WlvFnzXrwdGHlEWxEZ+Scj+y2wpAuCCABAAPhQ a7t8aIrBW+cnI62FqAmPlPu9xK6pOD5NZ/s3eoNiXxzcbYCxweDv7ypGyYOtSB4a es6fdgCcNWSUZAuBP2OQv+/NGnCyHLmUiQA/AwUYN2gwqmXzgMnytxK0EQJHQQCf Rzkk500k4fkaQiM05xFdxnWaU84AnRbIys57P0JveKdE6Gfa8XjrMHOS =lYII -----END PGP PUBLIC KEY BLOCK-----
participants (2)
-
Nick Strauss -
Oscar van Vlijmen