isWithinRange
Commons
stable
Returns true when a date is strictly after range[0] and strictly before range[1]. Both bounds are exclusive.
API
Signature
Full TypeScript signature sourced from the util file.
API
Parameters
Input parameters accepted by this util.
- daterequiredDate
- The date to test against the range.
- rangerequired[Date, Date]
- A two-element tuple [start, end]. Both bounds are exclusive (strict comparison).
API
Return value
The value returned by this util.
- true when date > range[0] && date < range[1].
Usage
Examples
Ready-to-paste usage snippets.
Range inclusion check