Announcement Announcement Module
Collapse
No announcement yet.
Day of Week Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Day of Week

    Many times in the past people have asked about how to compute the Day of the Week given the year month and day; Here's one that I use. I tested it against objrexx and S390/rexx date functions over a 400 year cycle of the Gregorian Calendar. a = (14 - month) % 12; y = year - a; m = month + 12*a - 2; d =1 + (day + y + (y % 4) - (y % 100) + (y % 400) + ((31 * m) % 12)) // 7 ; { % is integer divide; // is MOD for the C-Heads } if d = 1 then DOWK = Sunday et c.

    dowk.rex
Working...
X