toDatePeriodRange()
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Makes the range of periods of a filter from its ends.
export declare function toDatePeriodRange(from: DatePeriodLiteral | undefined, to: DatePeriodLiteral | undefined): DatePeriodRange;
Parameters
Parameter | Type | Description |
|---|---|---|
from | DatePeriodLiteral | undefined | first period of the range; undefined for a range open at the start |
to | DatePeriodLiteral | undefined | last period of the range; undefined for a range open at the end |
Returns
the range
Exceptions
Error when neither end is set
Remarks
A range has at least one end; the one it lacks is left out, so the range is open on that side. The function does not check the literals, see isValidDatePeriodRange().