Skip to main content
Deno 2 is finally here 🎉️
Learn more
Very Popular
Go to Latest
function default
import { default } from "https://deno.land/x/date_fns@v2.0.0-alpha.15/areIntervalsOverlapping/index.js";

Examples

// For overlapping time intervals: areIntervalsOverlapping( {start: new Date(2014, 0, 10), end: new Date(2014, 0, 20)}, {start: new Date(2014, 0, 17), end: new Date(2014, 0, 21)} ) //=> true

// For non-overlapping time intervals: areIntervalsOverlapping( {start: new Date(2014, 0, 10), end: new Date(2014, 0, 20)}, {start: new Date(2014, 0, 21), end: new Date(2014, 0, 22)} ) //=> false

Parameters

dirtyIntervalLeft
  • the first interval to compare. See [Interval]docs/types/Interval
dirtyIntervalRight
  • the second interval to compare. See [Interval]docs/types/Interval
dirtyOptions