add-days
Add or subtract days from a date (without modifying the original date)
Install
npm install add-days
Usage
const addDays = require('add-days');
const today = new Date();
const tomorrow = addDays(today, 1);
// today.toISOString() => '1985-09-25T00:00:00.000Z'
// tomorrow.toISOString() => '1985-09-26T00:00:00.000Z'
API
addDays(date, days)
date
Type: Date
(required)
days
Type: Number
(required)
License
MIT