1.0.0 • Published 8 years ago

get-dates-until v1.0.0

Weekly downloads
2
License
ISC
Repository
github
Last release
8 years ago

get-dates-until

GetDatesUntil(endDate, startDate)

Takes an end date and an (optional) start date, returns an array of Date objects representing the calendar days until the end date.

If no start date is given today will be assumed. If the end date is the same as the start date, or before the start date, an empty array will be returned.

Install

$ npm install get-dates-until --save

Usage

const GetDatesUntil = require('get-dates-until');

let theYear2525 = new Date(2525, 0, 1);
let daysToGo = GetDatesUntil(theYear2525);
// Array of objects representing every day from now until the year 2525