1.0.1 • Published 8 years ago

is-valid-date-object v1.0.1

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

is-valid-date-object

Returns true when passed a Date object with a value other than 'Invalid Date'. Returns false otherwise.

Install

$ npm install is-valid-date-object --save

Usage

const IsValidDate = require('is-valid-date-object');

IsValidDate( new Date() );
// true

IsValidDate( new Date('not a date string') );
// false

IsValidDate('13 December 2001');
// false