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.8/isWithinInterval/index.js";

Examples

// For the date within the interval: isWithinInterval( new Date(2014, 0, 3), {start: new Date(2014, 0, 1), end: new Date(2014, 0, 7)} ) //=> true

// For the date outside of the interval: isWithinInterval( new Date(2014, 0, 10), {start: new Date(2014, 0, 1), end: new Date(2014, 0, 7)} ) //=> false

Parameters

dirtyDate
  • the date to check
dirtyInterval
  • the interval to check
dirtyOptions