array-support
Imported from yugajs/extension/array-support.
Variables
Section titled “Variables”arraySupport
Section titled “arraySupport”const arraySupport: yuga.Extension<void>;Adds arrays of wall-clock values as parsables, Day.js’s arraySupport plugin.
Years 0-99 stay as written ([50, 0, 1] is the year 50), Day.js reads them as 1950, the
same as the Date constructor. A single value ([2024]) is January 1st of the year, the same as
the string "2024".
wallToEpoch
Section titled “wallToEpoch”const wallToEpoch: (wall, timeZone) => number;The epoch milliseconds of the wall clock [year, month, date, hour, minute, second, millisecond]
(overflowing values carry, month: 13 is January of the next year) in a time zone (undefined
is the system’s), NaN when it is invalid. Used by object-support too.
The wall clock is normalized as the UTC fields of a Date, which reads years 0-99 as
written with setUTCFullYear (the constructor and Date.UTC read them as 19xx), then moved to
the time zone keeping it, which knows its offsets and gaps.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
wall |
readonly number[] |
timeZone |
string | undefined |
Returns
Section titled “Returns”number