Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/date_fns/index.js>isThisWeek

date-fns Deno package
Very Popular
Go to Latest
function isThisWeek
import { isThisWeek } from "https://deno.land/x/date_fns@v2.0.0-beta.2/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