Anonymous user
Day of the week: Difference between revisions
m
→old school DOW: re-installed original comment with dashes, not minuses. -- ~~~~
m (→old school DOW: re-installed original comment with dashes, not minuses. -- ~~~~) |
|||
Line 1,912:
end /*y*/
exit /*stick a fork in it, we're done.*/
/*──────────────────────────────────DOW (day of week) subroutine────────*/
dow: procedure; arg m,d,y; if m<3 then do; m=m+12; y=y-1; end
yL=left(y,2); yr=right(y,2); w=(d + (m+1)*26%10+yr+yr%4+yL%4+5*yL) // 7
|