Esc

first_of_month

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

Returns the first day of the validated date's month.

Signature

first_of_month :: (value: Date) -> Date
Example↗
d := first_of_month(Date.{ 2024, 3, 15 });
assert(d.day == 1 && d.month == 3);

See also