A module for getting the days left until a given date
$ npm install --save daysleft
/* Assuming 'today' is 12/24/2017 */
import daysleft from 'daysleft';
const christmas = '12/25/2017';
daysleft(christmas);
//=> '1'
/* Assuming 'today' is 12/24/2017 */
import moment from 'moment';
import daysleft from 'daysleft';
const christmas = moment('12/25/2017');
daysleft(christmas);
//=> '1'
Type: string
or moment
Examples: '12/24/2017'
or moment('12/24/2017')
Type: string
or moment
Default: today
Examples: '12/24/2017'
or moment('12/24/2017')
Allows you to provide a different start date other than 'today'
- daysleft-cli - CLI for this module
MIT © Quinton Bolt