Anonymous user
Last Friday of each month: Difference between revisions
m
→{{header|REXX}}: removed some blank lines, changed box gylphs. -- ~~~~
(→{{header|C sharp}}: Added implementation in C#.) |
m (→{{header|REXX}}: removed some blank lines, changed box gylphs. -- ~~~~) |
||
Line 779:
This REXX program will find the last day-of-week (for any day) of all the months for any year.
<lang rexx>/*REXX program displays dates of last Fridays of each month for any year*/
parse arg yyyy
do j=1 for 12
Line 785 ⟶ 784:
end /*j*/
exit /*stick a fork in it, we're done.*/
/*┌────────────────────────────────────────────────────────────────────┐
│ lastDOW: procedure to return the date of the last day-of-week of │
│ any particular month of any particular year. │
Line 811 ⟶ 809:
│ the month, bypassing the leapday mess). The last day-of-week is │
│ then obtained straightforwardly, or via subtraction. │
└────────────────────────────────────────────────────────────────────┘*/
lastdow: procedure; arg dow .,mm .,yy . /*DOW = day of week*/
parse arg a.1,a.2,a.3 /*orig args, errmsg*/
|