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

addISOWeekYears

import { addISOWeekYears } from "https://esm.sh/v135/date-fns@3.6.0/index.d.mts";
@example
// Add 5 ISO week-numbering years to 2 July 2010:
const result = addISOWeekYears(new Date(2010, 6, 2), 5)
//=> Fri Jn 26 2015 00:00:00
function addISOWeekYears<DateType extends Date>(date: DateType | number | string, amount: number): DateType;
§
addISOWeekYears<DateType extends Date>(date: DateType | number | string, amount: number): DateType
[src]

§Type Parameters

§
DateType extends Date
[src]

§Parameters

§
date: DateType | number | string
[src]
  • The date to be changed
§
amount: number
[src]
  • The amount of ISO week-numbering years to be added.

§Return Type

§
DateType
[src]

The new date with the ISO week-numbering years added