2.0.1 • Published 4 years ago

add-days v2.0.1

Weekly downloads
243
License
ISC
Repository
github
Last release
4 years ago

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

2.0.1

4 years ago