addYears

addYears(value)

Adds the specified number of years to the value of this instance.

ParameterTypeDescription
valueintA number of years. The value parameter can be negative or positive.

Returns: A DateTime object whose value is the sum of the date and time represented by this instance and the number of years represented by value.