Path: utzoo!attcan!uunet!lll-winken!ames!pasteur!ucbvax!hplabs!hpda!hpcuhb!hpsmtc1!swh From: swh@hpsmtc1.HP.COM (Steve Harrold) Newsgroups: comp.sources.wanted Subject: Re: Need Routine to Calculate Day of Week Message-ID: <11720006@hpsmtc1.HP.COM> Date: 11 Jan 89 16:02:36 GMT References: <176@jetson.UPMA.MD.US> Organization: Hewlett Packard, Cupertino Lines: 9 Re: day-of-week code Sorry, no source, but here's the outline: Insert the day/month/year into a tm struct, and call mktime(). The result, when divided by 86400L (60*60*24) gives number of days since Jan 1, 1970. Find out what day of week the 1/1/70 date was and add it to the result. A simple modulo 7 calculation will now tell you what day of week your desired date is.