weeknum

weeknum(d: date) 🡒 number, pure function

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

Example:

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

See also