Function: rangeContainsDayOfWeek()
rangeContainsDayOfWeek(
range
,dayOfWeek
,dateLib
):boolean
Returns whether a date range contains one or more days of the week.
const range: DateRange = {
from: new Date(2024, 8, 1), // Sunday
to: new Date(2024, 8, 6) // Thursday
};
rangeContainsDayOfWeek(date, 1); // true: contains range contains Monday
Parameters​
Parameter | Type | Default value |
---|---|---|
range | object | undefined |
range.from | Date | undefined |
range.to | Date | undefined |
dayOfWeek | number | number [] | undefined |
dateLib | DateLib | defaultDateLib |
Returns​
boolean
Since​
9.2.2