Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

setISOWeek

import { setISOWeek } from "https://esm.sh/v135/date-fns@3.6.0/index.d.mts";
@example
// Set the 53rd ISO week to 7 August 2004:
const result = setISOWeek(new Date(2004, 7, 7), 53)
//=> Sat Jan 01 2005 00:00:00
function setISOWeek<DateType extends Date>(date: DateType | number | string, week: number): DateType;
§
setISOWeek<DateType extends Date>(date: DateType | number | string, week: number): DateType
[src]

§Type Parameters

§
DateType extends Date
[src]

§Parameters

§
date: DateType | number | string
[src]
  • The date to be changed
§
week: number
[src]
  • The ISO week of the new date

§Return Type

§
DateType
[src]

The new date with the ISO week set