Find the last Sunday of each month: Difference between revisions

m
(tighter code)
Line 1,093:
 
=={{header|REBOL}}==
<lang REBOL>last-sundays-of-year:#!/usr/bin/env function [rebol
 
last-sundays-of-year: function [
"Return series of last sunday (date!) for each month of the year"
year [integer!] "which year?"
Line 1,106 ⟶ 1,108:
]
 
foreach sunday last-sundays-of-year to-integer inputsystem/script/args [print sunday]
</lang>
{{out}}
<pre>rebol -qs rosetta./last-sundaysundays.reb <<< 2013
27-Jan-2013
24-Feb-2013
Anonymous user