Find the last Sunday of each month: Difference between revisions
Find the last Sunday of each month (view source)
Revision as of 17:00, 18 January 2020
, 4 years ago→{{header|Factor}}: tweak whitespace
m (→{{header|Factor}}: tweak whitespace) |
|||
Line 1,143:
=={{header|Factor}}==
This program expects a year passed in via command line argument. In case you are wondering — yes — Factor has a <tt>last-sunday-of-month</tt> word in its calendar vocabulary. This is par for the course when it comes to Factor.
<lang factor>USING: calendar calendar.format command-line io kernel math math.parser▼
▲USING: calendar calendar.format command-line io kernel math math.parser
sequences ;
IN: rosetta-code.last-sunday
Line 1,154 ⟶ 1,153:
: main ( -- ) parse-year 12 [ process-month ] times drop ;
MAIN: main</lang>
{{out}}
<pre>
|