Skip to content

afeiship/next-range-date

Repository files navigation

next-range-date

Get a date range.

version license size download

installation

npm install -S @jswork/next-range-date

usage

import '@jswork/next-range-date';

const start = '2020-09-01';
const end = '2020-09-08';
const json = nx.rangeDate(start, end, true);;

/*
[
  '2020-09-01T00:00:00.000Z',
  '2020-09-02T00:00:00.000Z',
  '2020-09-03T00:00:00.000Z',
  '2020-09-04T00:00:00.000Z',
  '2020-09-05T00:00:00.000Z',
  '2020-09-06T00:00:00.000Z',
  '2020-09-07T00:00:00.000Z',
  '2020-09-08T00:00:00.000Z'
];
*/

license

Code released under the MIT license.