addYears()function
addYears(change: number, target?: PossibleDate, caller: AnyCaller = addYears): Date
| Param | Type | |
|---|---|---|
change | number | required |
target | PossibleDate | Values that can be converted to dates. |
caller | AnyCaller | Any calling function or constructor, usually referring to something that can call in the current scope that can appear in a stack trace. Defaults to addYears |
| Return | |
|---|---|
Date |
Return a new date that increase or decreases the month based on an input date.
- February 29th is a special cased and is rounded down to February 28th on non-leap years.