date-before
v1.0.1
Published
Determine if a date is before another
Downloads
4
Readme
date-before
Determine if a date is before another
Install
$ npm install --save date-before
Usage
const isBefore = require('date-before')
isBefore(new Date(1988, 6, 29))
//=> true
isBefore(new Date(1988, 6, 29), new Date(1900, 1, 1))
//=> false
isBefore('unicorns')
//=> undefined
API
isBefore(date[, dateCompare])
date
Type: date
or something compatible with new Date()
dateCompare
Type: date
or something compatible with new Date()
Default: new Date()
License
MIT © Pier-Luc Gendreau