Path: utzoo!yunexus!maccs!cs3ia3ac From: cs3ia3ac@maccs.McMaster.CA (Howard Betel) Newsgroups: comp.lang.pascal Subject: Re: Day-of-week algorithm, please! Message-ID: <2445@maccs.McMaster.CA> Date: 17 Apr 89 04:25:15 GMT Article-I.D.: maccs.2445 References: <19040@adm.BRL.MIL> Reply-To: cs3ia3ac@maccs.UUCP (Howard Betel) Organization: McMaster U., Hamilton, Ont., Can. Lines: 18 In article <19040@adm.BRL.MIL> you write: >I know this isn't quite appropriate to the list, but I really need an >algorithm that will return the day of the week given today's date. >Thanx in advance. I know this is bad programming technique, but one way I implemented this on a PC was to capture the current date in a variable. I then reset the clock to the date I was interested in and pulled the day of the week right off the computer. Let it do the work. Dirty but effective if it is a date in the future and not before 1984 (or somewhere there abouts). If you want more info, I can dig it out of my program. BTW Don't forget to reset the date. -- Howard Betel cs3ia3ac@maccs.McMaster.CA