Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/complaindate/utils/addMonths.ts>addMonths

JavaScript date-time utilities that keep timezones on the surface
Latest
function addMonths
import { addMonths } from "https://deno.land/x/complaindate@v1.0.1/utils/addMonths.ts";

Get a function curried with a number of months to add to its plain-date arguments.

The resulting day-of-month will always be within the expected month, days will not spill over into the next month.

Parameters

months: number

The number of months to add or subtract

Returns

<T extends ComPlainDate>(date: T) => T

A curried function that operates on plain-dates