Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/date_fns/getWeek/index.js>default

date-fns Deno package
Very Popular
Go to Latest
function default
import { default } from "https://deno.land/x/date_fns@v2.11.1/getWeek/index.js";

Examples

// Which week of the local week numbering year is 2 January 2005 with default options? var result = getISOWeek(new Date(2005, 0, 2)) //=> 2

// Which week of the local week numbering year is 2 January 2005, // if Monday is the first day of the week, // and the first week of the year always contains 4 January? var result = getISOWeek(new Date(2005, 0, 2), { weekStartsOn: 1, firstWeekContainsDate: 4 }) //=> 53

Parameters

dirtyDate
  • the given date
options