Socket
Book a DemoInstallSign in
Socket

is-today

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-today

Check if a date is today with optional conversion to date.

latest
Source
npmnpm
Version
2.0.1
Version published
Maintainers
2
Created
Source

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

Keywords

date

FAQs

Package last updated on 15 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts