Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!sunic!tut!ra!chyde!ts From: ts@chyde.uwasa.fi (Timo Salmi LASK) Newsgroups: comp.binaries.ibm.pc.d Subject: Re: Looking for D.O.W. algorithm Keywords: weekday Message-ID: <766@chyde.uwasa.fi> Date: 17 Sep 89 05:57:59 GMT References: <6470@hubcap.clemson.edu> <1839@sactoh0.UUCP> Reply-To: ts@chyde.uwasa.fi (Timo Salmi LASK) Organization: U of Vaasa, Finland Lines: 16 In article <1839@sactoh0.UUCP> brent@sactoh0.UUCP (Brent K. Barrett) writes: >In article <6470@hubcap.clemson.edu>, chrisb@hubcap.clemson.edu (Chris) writes: >> I am looking for an algorithm which gives the day of the week (M,T,W,Th,...) >> for a given date... (9,15,1989) Sept 15, 1989 --- would be Friday. > It's a BIOS call. Here's a simple C function that returns the This is a subject that seems to pop up about every weekday:-) The bios call only returns the *current* weekday, but for *any* weekday an algorithm is needed. For that scan the old news eg in comp.lang.pascal, or see Dr.Dobbs Journal, June 1989, page 148. ................................................................... Prof. Timo Salmi (Site 128.214.12.3) School of Business Studies, University of Vaasa, SF-65101, Finland Internet: ts@chyde.uwasa.fi Funet: vakk::salmi Bitnet: salmi@finfun