Path: utzoo!attcan!uunet!ns-mx!iowasp.physics.uiowa.edu!maverick.ksu.ksu.edu!zaphod.mps.ohio-state.edu!samsung!cs.utexas.edu!rutgers!dimacs.rutgers.edu!seismo!beno!stead From: stead@beno.CSS.GOV (Richard Stead) Newsgroups: comp.lang.c Subject: Re: Date functionality Message-ID: <49034@seismo.CSS.GOV> Date: 2 Aug 90 00:05:55 GMT References: <171@ittc.wec.com> <8931@ubc-cs.UUCP> Sender: dsc@seismo.CSS.GOV Lines: 12 In article <8931@ubc-cs.UUCP>, buckland@cheddar.ucs.ubc.ca (Tony Buckland) writes: > Let's see if I can get it right this time. The statement function > following will work: > > DOW(ID,IM,IC,IY)=MOD((26*IM-2)/10+ID+IY+IY/4+IC/4-2*IC,7) Ouch, smells like FORTRASH. Isn't this comp.lang.c? Steve Clamage already posted the C version of this (Zeller's congruence). If you want a function, #define it. --Richard Stead stead@seismo.css.gov