Skip to content

Returns true for a Date object with a value other than 'Invalid Date', false otherwise.

Notifications You must be signed in to change notification settings

rossb/is-valid-date-object

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Returns true for a Date object with a value other than 'Invalid Date', false otherwise.

Resources

Stars

Watchers

Forks

Packages