-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Description
There is an issue with the areIntervalsOverlapping function
The problem
💻 Code demonstrating the problem
https://stackblitz.com/edit/date-fns-playground-c8oyu9?file=index.ts
import { areIntervalsOverlapping } from 'date-fns';
const left = {
start: '1970-01-01T02:00:00.000Z',
end: '1970-01-01T03:00:00.000Z',
};
const right = {
start: '1969-12-31T23:30:00.000Z',
end: '1970-01-01T02:30:00.000Z',
};
console.log(areIntervalsOverlapping(left, right, { inclusive: true }));
// => false🙁 Actual behavior
areIntervalsOverlapping returns false
🙂 Expected behavior
areIntervalsOverlapping returns true
Debug information
- date-fns version: 3.0.0
- Browser/Node.js version: Multiple/Any
- Your timezone: Europe/Copenhagen
- Your current time: 10:00-11:00
Metadata
Metadata
Assignees
Labels
No labels