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

Examples

// Set ISO week-numbering year 2007 to 29 December 2008: var result = setISOWeekYear(new Date(2008, 11, 29), 2007) //=> Mon Jan 01 2007 00:00:00

Parameters

dirtyDate
  • the date to be changed
dirtyISOWeekYear
  • the ISO week-numbering year of the new date