N = weeksinyear(Year)
Year
[ numeric ] - Year.N
[ numeric ] - Number of weeks in Year
.The number of weeks in a year is either 52
or 53
, and complies with the definition of the first week in a year in ISO 8601. The first week of a year is the one that contains the 4th day of January (in other words, has most of its days in that year).
weeksinyear(2000:2010)
ans =
52 52 52 52 53 52 52 52 52 53 52