addDays
Date
stable
Return a new Date shifted by the given number of days. The original date is never mutated.
API
Signature
Full TypeScript signature sourced from the util file.
API
Parameters
Input parameters accepted by this util.
- daterequiredDate
- The base date. Not mutated.
- amountrequirednumber
- Number of days to add. Negative values subtract days.
API
Return value
The value returned by this util.
- A new Date instance offset by the specified number of days.
Usage
Examples
Ready-to-paste usage snippets.
Add and subtract days