Skip to main content
Very Popular
Latest
function default
import { default } from "https://deno.land/x/date_fns@v2.22.1/setISOWeekYear/index.ts";

Examples

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

Parameters

dirtyDate: Date | number
  • the date to be changed
dirtyISOWeekYear: number
  • the ISO week-numbering year of the new date

Returns

the new date with the ISO week-numbering year set