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

Examples

// Are 31 August 2014 and 4 September 2014 in the same week? var result = isSameWeek(new Date(2014, 7, 31), new Date(2014, 8, 4)) //=> true

// If week starts with Monday, // are 31 August 2014 and 4 September 2014 in the same week? var result = isSameWeek(new Date(2014, 7, 31), new Date(2014, 8, 4), { weekStartsOn: 1 }) //=> false

Parameters

dirtyDateLeft
  • the first date to check
dirtyDateRight
  • the second date to check
dirtyOptions