Last Friday of each month: Difference between revisions
Content added Content deleted
Drkameleon (talk | contribs) No edit summary |
m (→{{header|Factor}}: update to Factor 0.98) |
||
Line 1,083: | Line 1,083: | ||
=={{header|Factor}}== |
=={{header|Factor}}== |
||
{{works with|Factor|0.98}} |
|||
The <code>last-friday-of-month</code> word in the <code>calendar</code> vocabulary does most of the work. This program expects the year as a command line argument. |
The <code>last-friday-of-month</code> word in the <code>calendar</code> vocabulary does most of the work. This program expects the year as a command line argument. |
||
<lang factor>USING: calendar calendar.format command-line io kernel math.parser sequences ; |
<lang factor>USING: calendar calendar.format command-line io kernel math.parser sequences ; |
||
IN: rosetta-code.last-fridays |
IN: rosetta-code.last-fridays |
||
(command-line) second string>number <year> 12 iota |
(command-line) second string>number <year> 12 <iota> |
||
[ months time+ last-friday-of-month ] with map |
[ months time+ last-friday-of-month ] with map |
||
[ timestamp>ymd print ] each</lang> |
[ timestamp>ymd print ] each</lang> |