weeknum

weeknum(d: date) 🡒 number, const pure function

Returns the week of the year (1-53) for the date passed as argument. Weeks start on Mondays.

show summary "" a1a3 with
  weeknum(date(2019, 12, 28))
  weeknum(date(2019, 12, 31))
  weeknum(date(2020, 1, 1))

weeknum(w: week) 🡒 number, const pure function

Returns the week of the year (1-53) for the week passed as argument.

show summary "" a1a3 with
  weeknum(week(2019, 5))
  weeknum(week(2019, 52))
  weeknum(week(2020, 1))

See also