On 26 May 2005 12:09:13 -0700, in bit.listserv.ibm-main (Message-ID:<[EMAIL PROTECTED]>) [EMAIL PROTECTED] (Baraniecki, Ray) wrote:

If year > "1900" Then year = year - 1
day = (year + (year / 4) + jday) // 7" in the hope of receiving an answer ranging from 1 through 7. When the year = 2004 and the julian day = 147 I get a result of 4.75. I
was expecting an answer of 4 which would indicate Wednesday.

     Two fixes:

1.  /* replace "/" with "%" */
  day = (year + (year % 4) + jday) // 7

2.  If you have MMDD in addition to DOY, you could code:
dayname = date("W",yyyymmdd,"S")
and let REXX do all of the work for you. I'm not sure which (if any) REXXes allow Julian date as input.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to