Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!csd4.milw.wisc.edu!bionet!agate!hughes@math.Berkeley.EDU From: hughes@math.Berkeley.EDU (Eric Hughes) Newsgroups: comp.sys.ibm.pc Subject: Re: calendar code Message-ID: <25831@agate.BERKELEY.EDU> Date: 28 Jun 89 03:41:30 GMT References: <82362@ti-csl.csc.ti.com> Sender: usenet@agate.BERKELEY.EDU Reply-To: hughes@math.Berkeley.EDU (Eric Hughes) Organization: UCB Mathematics Department Lines: 16 In-reply-to: Donahue@TILDE (Them bats is smart; they use radar!) In article <82362@ti-csl.csc.ti.com>, Donahue@TILDE (Them bats is smart; they use radar!) writes: > >I'm looking for a Turbo C function that, when given >an arbitrary date, will return the day of the week that the date >falls on. DOS call 42 (2A hex), which gets the date, also returns the day of the week in register CX. So first get the current date and save it, then set the date, get the date, get your answer, and reset the date. The DOS set date call is 43 (2B hex). I don't do this myself, but the idea is from Peter Norton's book _Programmer's Guide to the IBM PC_. Eric Hughes hughes@math.berkeley.edu ucbvax!math!hughes