Anonymous user
Day of the week: Difference between revisions
m
→old school DOW: used a template for the output section.
m (→using DATE iso: added some whitespace.) |
m (→old school DOW: used a template for the output section.) |
||
Line 3,742:
===old school DOW ===
This DOW (day-of-week) version will work with any version of a REXX interpreter.
<lang rexx>/*REXX program (old school) displays in which years 12/25 (Dec. 25th) falls on a Sunday.*/
parse arg start finish . /*get the START and FINISH years. */
Line 3,756:
yL=left(y,2); yr=right(y,2); w=(d + (m+1)*26%10+yr+yr%4+yL%4+5*yL) // 7
if w==0 then w=7; return w /*Sunday=1, Monday=2, ··· Saturday=7*/</lang>
<pre>
December 25th, 2011 falls on a Sunday.
|