2.0.1 • Published 8 years ago

is-today v2.0.1

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

is-today Build Status

Check if a date is today with optional conversion to date and time travel.

Install

$ npm install --save is-today

Usage

var isToday = require('is-today');

isToday(new Date());
//=> true

isToday('2015-08-19', {convert: true});
//=> true

isToday('1997-01-11', {convert: true, scope: new Date('1997-01-01')});
//=> true

API

isToday(date, options)

date

Required
Type: Date

options

Type: object Default: {}

keys on options

Type: convert Default: boolean

if true convert first parameter into a date object

Type: scope Default: new Date()

i can hack you back in time...

License

MIT © Ulrik Augustsson

2.0.1

8 years ago

2.0.0

9 years ago

1.0.0

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago