RosettaCodeData/Task/Five-weekends/Zkl/five-weekends-3.zkl
2017-09-25 22:28:19 +02:00

7 lines
210 B
Text

var [const] D=Time.Date, r=L();
foreach y in ([1900..2100]){ yes:=True;
foreach m in ([1..12]){
if (D.daysInMonth(y,m)==31 and 5==D.weekDay(y,m,1)) { yes=False; break; }
}
if (yes) r.append(y)
}