Wilang Documentation1.0.0+4

startOf#

The start of a calendar period, as epoch milliseconds.

Available in: math cells, REPL.

Syntax#

startOf(value, period [, timezone])

Arguments and behavior#

Periods: day, month, year. The boundary is computed in the given timezone, so it follows the calendar rather than a fixed length — a month is as long as the calendar says. The example returns scalar (number).

Example#

Edit the inputs, then use Run or Reset. Changes stay in this example.

Example
startOf(toEpoch("2024-03-15 13:37"), "month")

Expected result: 1.7092512e+12.

See also#

endOf · parseDateTime · toEpoch · formatDateTime · formatTime

All functions · Math guides