Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!sri-unix!teknowledge-vaxc!mkhaw From: mkhaw@teknowledge-vaxc.UUCP Newsgroups: comp.unix.wizards Subject: Re: Date conversion question Message-ID: <9945@teknowledge-vaxc.ARPA> Date: Tue, 24-Feb-87 14:07:20 EST Article-I.D.: teknowle.9945 Posted: Tue Feb 24 14:07:20 1987 Date-Received: Thu, 26-Feb-87 23:30:19 EST References: <222@devon.UUCP> <2590003@hpisod2.HP.COM> Reply-To: mkhaw@teknowledge-vaxc.UUCP (Michael Khaw) Organization: Teknowledge, Inc., Palo Alto CA Lines: 15 Is there a clever formula that will give you the day of the week (as a number between 1 and 7 or 0 and 6) given year, month, and date? I've only been able determine day of week from date by using a reference date like: Jan. 1, 1972, was a Saturday -- and computing the offset from it (and keeping track of leap days). Mike Khaw -- internet: mkhaw@teknowledge-vaxc.arpa usenet: {hplabs|sun|ucbvax|decwrl|sri-unix}!mkhaw%teknowledge-vaxc.arpa voice: 415/424-0500 USnail: Teknowledge, Inc., 1850 Embarcadero Rd., POB 10119, Palo Alto, CA 94303