addMonths
Function
Definition
Package:@progress/kendo-date-math
Syntax:
ts
addMonths(new Date(2016, 5, 1), 5); // 2016-11-1
addMonths(new Date(2016, 5, 1), -5); // 2015-1-1
A function that adds and subtracts months from a Date object.
Parameters:dateDate
The initial date value.
offsetnumberThe number of months to add or subtract from the date.
Returns:Date
- A new
Dateinstance.