Skip to content

DurationToMsOptions

type DurationToMsOptions = object;

Defined in: duration-utils.ts:51

Options for durationToMs: the reference time that calendar units need.

relativeTo?: DateLike;

Defined in: duration-utils.ts:58

Reference time for durations that include calendar units (days/weeks/months/years).

If omitted and the duration contains calendar units, this function throws because the number of milliseconds is not well-defined without a reference.