Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!RPIECS.BITNET!FISHER From: FISHER@RPIECS.BITNET ("John S. Fisher") Newsgroups: comp.lang.asm370 Subject: Day-of-week calculation Message-ID: <9001042228.AA12914@brazos.rice.edu> Date: 4 Jan 90 18:32:38 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: IBM 370 Assembly Programming Discussion List Distribution: inet Organization: The Internet Lines: 19 More REXX code. The DAYS procedure, below, computes number of days since 02/28/1900 for an mm/dd/yy date. Use the remainder of that number divided by 7 to get day of week. /*********************************************************************/ /* DAYS Compute days since 02/28/00. */ /*********************************************************************/ DAYS: Procedure; arg mm'/'dd'/'yy; mm = mm - 3; if mm < 0 then do; yy = yy - 1; mm = mm + 12; end; return( trunc((5+306*mm)/10) + dd + 365*yy + trunc(yy/4) ); /JSFisher