Wilang Documentation1.0.0+4

endOf#

The last millisecond of a calendar period, as epoch milliseconds.

Available in: math cells, REPL.

Syntax#

endOf(value, period [, timezone])

Arguments and behavior#

Periods: day, month, year. The result is the final millisecond before the next period starts, so the end of a month is the last moment of that month rather than the start of the next one. The example returns scalar (number).

Example#

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

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

Expected result: 1.711929599999e+12.

See also#

startOf · parseDateTime · toEpoch · formatDateTime · formatTime

All functions · Math guides