Most years have 52 weeks, some have 53, according to ISO8601.



Task

Write a function which determines if a given year is long (53 weeks) or not, and demonstrate it.




longYear?: function [year][
    date: to :date .format: "dd/MM/yyyy" ~"01/01/|year|"
 
    or? date\Day = "Thursday" 
        and? leap? year
             date\Day = "Wednesday"
]
 
print "Years with 53 weeks between 2000 and 2100:"
print select 2000..2100 => longYear?