Package Exports
- moment-array-dates
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (moment-array-dates) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Moment Array Dates
A small utility function that accepts two dates, and returns an array of formatted date strings, including the inputs.
Installation
npm install --save moment-array-dates
Usage
Import date range array:
var getDateRange = require('moment-array-dates');
Pass start date and date range:
getDateRange('09/01/2016', '09/30/2016')
(optional) Pass format as third parameter:
getDateRange('09/01/2016', '09/30/2016', 'dddd, MMMM Do YYYY, h:mm:ss a')
Please refer to the Momentjs documentation for formatting options
(optional) Pass true
as the last parameter for ascending order:
getDateRange('09/01/2016', '09/30/2016, 'MMM DD', true)
Todos
- Write more tests
License
GPL-v3