overlaps
Checks whether two date ranges overlap.
Two ranges overlap when rangeA.start <= rangeB.end AND
rangeB.start <= rangeA.end (inclusive on both ends).
Returns false if any date is invalid.
Available since v2.0.0
Import
Section titled “Import”Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
rangeA | DateRange | First date range |
rangeB | DateRange | Second date range |
Returns
Section titled “Returns”boolean — true if the ranges share at least one point in time
Examples
Section titled “Examples”overlaps
Section titled “overlaps”Related Types
Section titled “Related Types”DateRange
Section titled “DateRange”A date range represented as a pair of date-like values.
