Checks if the given value is a valid Date object. A valid date is an instance of Date and has a non-NaN time value.
Date
The value to check.
True if the value is a valid Date, otherwise false.
// => trueisValidDate(new Date()) Copy
// => trueisValidDate(new Date())
// => falseisValidDate(new Date(NaN)) Copy
// => falseisValidDate(new Date(NaN))
// => falseisValidDate('2014-02-31') Copy
// => falseisValidDate('2014-02-31')
Checks if the given value is a valid Date object. A valid date is an instance of
Date
and has a non-NaN time value.