Five weekends: Difference between revisions
→{{header|J}}: format inside verb
m (→{{header|J}}) |
(→{{header|J}}: format inside verb) |
||
Line 13:
months=. 1 3 5 7 8 10 12
dates=. 31
fivewkds=. (#~ 0 = weekday) >,{years;months;dates NB. 5 full weekends iff 31st is Sunday(0)
>'MMM YYYY' fmtDate toDayNo fivewkds
)</lang>
'''Usage:'''
<lang j> # find5wkdMonths '' NB. number of months found
201
Mar 1901
Aug 1902
Line 24 ⟶ 25:
Jan 1904
Jul 1904
...
Mar 2097
Aug 2098
|