Function
addYears
(
date: DateArg<DateType>,
amount: number,
options?: AddYearsOptions<ResultDate> | undefined,
)
Source from the content-addressed store, hash-verified
| 31 | * //=> Sun Sep 01 2019 00:00:00 |
| 32 | */ |
| 33 | export function addYears< |
| 34 | DateType extends Date, |
| 35 | ResultDate extends Date = DateType, |
| 36 | >( |
| 37 | date: DateArg<DateType>, |
| 38 | amount: number, |
| 39 | options?: AddYearsOptions<ResultDate> | undefined, |
| 40 | ): ResultDate { |
| 41 | return addMonths(date, amount * 12, options); |
| 42 | } |
Tested by
no test coverage detected