New to KendoReactStart a free 30-day trial

addYears

Function

Definition

Package:@progress/kendo-date-math

Syntax:

ts
addYears(new Date(2016, 5, 1), 5); // 2011-6-1
addYears(new Date(2016, 5, 1), -5); // 2021-6-1

A function that adds and subtracts years from a Date object.

Parameters:valueDateoffsetnumber

The number of years to add or subtract from the date.

Returns:

Date

  • A new Date instance.
In this article
Definition
Not finding the help you need?
Contact Support