The date to check
The date is valid
isValid
Returns false if argument is Invalid Date and true otherwise. Argument is converted to Date using toDate. See toDate Invalid Date is a Date, whose time value is NaN.
toDate
Time value of Date: http://es5.github.io/#x15.9.1.1
// For the valid date:const result = isValid(new Date(2014, 1, 31))//=> true Copy
// For the valid date:const result = isValid(new Date(2014, 1, 31))//=> true
// For the value, convertible into a date:const result = isValid(1393804800000)//=> true Copy
// For the value, convertible into a date:const result = isValid(1393804800000)//=> true
// For the invalid date:const result = isValid(new Date(''))//=> false Copy
// For the invalid date:const result = isValid(new Date(''))//=> false
The date to check