1.0.0 • Published 8 years ago
get-next-dates v1.0.0
get-next-dates
GetNextDates(range[, startDate])
Returns an array of Date objects to the specified length, representing the calendar dates following the Date object supplied.
If no date object is supplied, the current time is used as the start date. Range is required, and must be a positive integer. If an invalid range or date is given, an error is thrown.
Install
$ npm install get-next-dates --save
Usage
GetNextDates(range, startDate)
const GetNextDates = require('get-next-dates');
let nextSevenDays = GetNextDates(7);
// Array of 7 Date objects, starting with tomorrow
let milleniumEve = new Date(1999, 11, 31);
let first100DaysOfCentury = GetNextDates(100, milleniumEve);
// Array of 100 Date objects, starting with Jan 1, 2000
1.0.0
8 years ago