subtractMonths
Subtracts a positive number of months from a TheDate.
Interactive example
Syntax
Classic signature
typescript
function subtractMonths<
GenericInput extends TheDate,
GenericMonth extends number
>(
input: GenericInput,
month: PositiveNumber<GenericMonth>
): TheDateCurried signature
typescript
function subtractMonths<
GenericInput extends TheDate,
GenericMonth extends number
>(
month: PositiveNumber<GenericMonth>
): (input: GenericInput) => TheDateParameters
month: Number of months to subtract.input: Source date.
Return value
A TheDate moved back by the given number of months.
