Function: rangeContainsModifiers()
rangeContainsModifiers(
range
,modifiers
,dateLib
):boolean
Returns whether a range contains dates that match the given modifiers.
const range: DateRange = {
from: new Date(2021, 12, 21),
to: new Date(2021, 12, 30)
};
const matcher1: Date = new Date(2021, 12, 21);
const matcher2: DateRange = {
from: new Date(2022, 5, 1),
to: new Date(2022, 5, 23)
};
rangeContainsModifiers(range, [matcher1, matcher2]); // true, since matcher1 is in the date.
Parameters​
Parameter | Type | Default value |
---|---|---|
range | object | undefined |
range.from | Date | undefined |
range.to | Date | undefined |
modifiers | Matcher | Matcher [] | undefined |
dateLib | DateLib | defaultDateLib |
Returns​
boolean
Since​
9.2.2