Type Alias: DateRange
DateRange: {
from
:Date
|undefined
;to
:Date
; }
A range of dates. The range can be open. Differently from DateInterval, the range ends here are included.
Type declaration
Name | Type |
---|---|
from | Date | undefined |
to ? | Date |
Example
// Match the days between the 2nd and the 5th of February 2019
const matcher: DateRange = {
from: new Date(2019, 1, 2),
to: new Date(2019, 1, 5)
};