Esc

is_leap_year

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

Tests the Gregorian leap rule within the supported year range.

Signature

is_leap_year :: (year: s64) -> bool
Example↗
assert(is_leap_year(2000));
assert(!is_leap_year(1900));

See also