The result Date type, it is the type returned from the context function if it is passed, or inferred from the arguments.
The date to be changed
The amount of days to be added.
Optionaloptions: AddDaysOptions<ResultDate>An object with options
The new date with the days added
Add the specified number of days to the given date.
You don't need date-fns*:
Temporal has a built-in add method on all its classes:
Temporal.Instant.prototype.add()Temporal.PlainDate.prototype.add()Temporal.PlainDateTime.prototype.add()Temporal.PlainTime.prototype.add()Temporal.PlainYearMonth.prototype.add()Temporal.ZonedDateTime.prototype.add()* Not really, see: https://date-fns.org/you-dont-need-date-fns
The
Datetype, the function operates on. Gets inferred from passed arguments. Allows to use extensions likeUTCDate.