Jump to content

Last Friday of each month: Difference between revisions

m
→‎{{header|Factor}}: update to Factor 0.98
No edit summary
m (→‎{{header|Factor}}: update to Factor 0.98)
Line 1,083:
 
=={{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.
<lang factor>USING: calendar calendar.format command-line io kernel math.parser sequences ;
IN: rosetta-code.last-fridays
 
(command-line) second string>number <year> 12 <iota>
[ months time+ last-friday-of-month ] with map
[ timestamp>ymd print ] each</lang>
1,827

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.