Last Friday of each month: Difference between revisions
m
→{{header|J}}
(→{{header|Groovy}}: new solution) |
m (→{{header|J}}) |
||
Line 538:
=={{header|J}}==
<lang j>require 'dates'
last_fridays=: 12 {. [: ({:/.~ }:"1)@(#~ 5 = weekday)@todate (i.366) + todayno@,&1 1</lang>
In other words, start from January 1 of the given year, and count forward for 366 days, keeping the
Example use:
|