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

Examples

// If today is 25 September 2014, is 21 September 2014 in this week? var result = isThisWeek(new Date(2014, 8, 21)) //=> true

// If today is 25 September 2014 and week starts with Monday // is 21 September 2014 in this week? var result = isThisWeek(new Date(2014, 8, 21), { weekStartsOn: 1 }) //=> false

Parameters

dirtyDate
  • the date to check
options