date-before

1.0.1 • Public • Published

date-before Build Status NPM version

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

Readme

Keywords

Package Sidebar

Install

npm i date-before

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • zertz