1.0.1 • Published 8 years ago

date-before v1.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

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

1.0.1

8 years ago

1.0.0

8 years ago