Jump to content

Find the last Sunday of each month: Difference between revisions

m
→‎{{header|Sidef}}: modified code to work with Sidef 2.10
(Added Befunge example.)
m (→‎{{header|Sidef}}: modified code to work with Sidef 2.10)
Line 1,795:
 
=={{header|Sidef}}==
<lang ruby>var dt = require 'DateTime';
 
var (year=2015) = ARGV»to_i»()...;
 
range(1, 12).each { |i|
var date = %s'DateTime'dt.last_day_of_month(
year => year,
month => i
Line 1,806 ⟶ 1,805:
 
while (date.dow != 7) {
\date = date.subtract(days => 1);
};
 
say date.ymd;
2,747

edits

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