Skip to main content

Function: rangeContainsDayOfWeek()

rangeContainsDayOfWeek(range, dayOfWeek, dateLib): boolean

Defined in: src/utils/rangeContainsDayOfWeek.ts:15

Checks if a date range contains one or more specified days of the week.

Parameters

ParameterTypeDefault valueDescription
range{ from: Date; to: Date; }undefinedThe date range to check.
range.fromDateundefined-
range.toDateundefined-
dayOfWeeknumber | number[]undefinedThe day(s) of the week to check for (0-6, where 0 is Sunday).
dateLibDateLibdefaultDateLibThe date utility library instance.

Returns

boolean

true if the range contains the specified day(s) of the week, otherwise false.

Since

9.2.2