RosettaCodeData/Task/Long-year/Zkl/long-year.zkl
2023-07-01 13:44:08 -04:00

5 lines
228 B
Text

fcn isLongYear(y){ Time.Date.weeksInYear(y)==53 }
foreach nm,y in (T(T("20th",1900), T("21st",2000), T("22nd",2100))){
println("\nLong years in the %s century:\n%s".fmt(nm,
[y..y+99].filter(isLongYear).concat(" ")));
}