Skip to content

Latest commit

 

History

History
14 lines (11 loc) · 416 Bytes

is-overlap.md

File metadata and controls

14 lines (11 loc) · 416 Bytes

isOverlap

Compare between DayjsRange objects.

Example

import dayjsRange from 'dayjs-range-extend';

const dateRangeFirst = dayjsRange('2022-01-01', '2022-01-05');
const dateRangeSecond = dayjsRange('2022-01-03', '2022-01-07');
const dateRangeThird = dayjsRange('2022-01-10', '2022-01-15');

dateRangeFirst.isOverlap(dateRangeSecond); // => true
dateRangeFirst.isOverlap(dateRangeThird); // => false