Skip to main content

Function: rangeIncludesDate()

rangeIncludesDate(range, date, excludeEnds, dateLib): boolean

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

Checks if a given date is within a specified date range.

Parameters

ParameterTypeDefault valueDescription
rangeDateRangeundefinedThe date range to check against.
dateDateundefinedThe date to check.
excludeEndsbooleanfalseIf true, the range's start and end dates are excluded.
dateLibDateLibdefaultDateLibThe date utility library instance.

Returns

boolean

true if the date is within the range, otherwise false.

Since

9.0.0