Esc

days_in_month

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

Returns the Gregorian month length after validating year and month.

Signature

days_in_month :: (year: s64, month: s64) -> (s64, Time_Error)
Example↗
n, error := days_in_month(2024, 2);
assert(error.kind == .NONE && n == 29);

See also