Skip to main content

Function: addDays()

addDays(d, n): CalendarDate

Defined in: src/lib/dates/index.ts:119

Add a (possibly negative) number of whole days to a date. Pure UTC day arithmetic — correctly crosses month and year boundaries and is unaffected by DST or local timezone.

Parameters

d

CalendarDate

The starting calendar date.

n

number

Days to add; negative values subtract.

Returns

CalendarDate

A new CalendarDate n days from d.