Esc

iso_week

procedureextensionsince 0.36.1Source
  • macOS: iso_week works on macOS
  • Linux: iso_week works on Linux
  • Windows: iso_week works on Windows
  • Wasm: iso_week works on Wasm

Returns ISO week-year and week number; week one contains January 4.

Signature

iso_week :: (value: Date) -> (s64, s64)
Example↗
year, week := iso_week(Date.{ 2021, 1, 1 });
assert(year == 2020 && week == 53);

See also