Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ames!amdahl!pacbell!sactoh0!brent From: brent@sactoh0.UUCP (Brent K. Barrett) Newsgroups: comp.binaries.ibm.pc.d Subject: Re: Looking for D.O.W. algorithm Summary: C source Message-ID: <1839@sactoh0.UUCP> Date: 16 Sep 89 17:54:17 GMT References: <6470@hubcap.clemson.edu> Organization: Sacramento Public Access, Ca. USA Lines: 20 In article <6470@hubcap.clemson.edu>, chrisb@hubcap.clemson.edu (Chris) writes: > Hi, > 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 D.O.W. (0=Sunday, 1=Monday, ... etc.): int dow() { _AX = 0x2A00; geninterrupt(0x21); return(_AL); } -- //////// Novucivitas: The Future of Citadel /// US 916 726 4989 12/2400 bps //////// ..ames!pacbell!sactoh0!brent GEMAIL: B.K.BARRETT