Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!ginosko!uunet!mcsun!sunic!tut!ra!chyde!ts From: ts@chyde.uwasa.fi (Timo Salmi LASK) Newsgroups: comp.lang.pascal Subject: Re: Day of Week Algorithm Message-ID: <789@chyde.uwasa.fi> Date: 26 Sep 89 07:46:03 GMT References: <6570@hubcap.clemson.edu> Reply-To: ts@chyde.uwasa.fi (Timo Salmi LASK) Organization: U of Vaasa, Finland Lines: 19 In article <6570@hubcap.clemson.edu> bo@hubcap.clemson.edu (Bo Slaughter) writes: >Does anyone out there have a day of the week algorithm in pascal? >I want to be able to pass to it the date, and get the day out. >Something like this: >function dayofweek(day,month,year:integer):integer; I just don't believe it. This question has been posed and answered at least n + 1 times where n -> infinite, and beyond :-). Never mind though, let's do it once more. Dr.Dobb's Journal had the source in one of last year's issues. The Numerical Recipies by William Press & al has this algorithm. And the Turbo Pascal units collection TSPAS13.ARC (about to be updated by yours truly) has a function WKDAYFN (day, month, year : word) : byte; in TSUNTE.TPU. ................................................................... 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