parse-date-range
v0.1.0
Published
Parses two strings to determine whether they are valid ISO8601 Dates. Otherwise returns a date range of a given length (defaults to one week).
Downloads
7
Readme
parse-date-range
Parses two strings to determine whether they are valid ISO8601 Dates. Otherwise returns a date range of a given length (defaults to one week).
Installation
$ npm install --save parse-date-range
Usage
import parseDateRange from 'parse-date-range'
const res = parseDateRange('2016-08-11T10:39:56+00:00', '2016-08-11T10:39:56+00:00')
const startDate = res.startDate // Date object
const endDate = res.startDate // Date object
License
MIT © Mish Guru