import isDate from '../isDate/index' ; import toDate from '../toDate/index' ; import requiredArgs from '../_lib/requiredArgs/index' ; name category summary description Returns false if argument is Invalid Date and true otherwise.
 * Argument is converted to Date using `toDate`. See [toDate] https * Invalid Date is a Date, whose time value is NaN.
 *
 * Time value of Date: http://es5.github.io/#x15.9.1.1
 *
 *  param { * } date returns { Boolean } throws example example example export default function isValid ( dirtyDate ) { requiredArgs ( 1 , arguments ) ; if ( ! isDate ( dirtyDate ) && typeof dirtyDate !== 'number' ) { return false ; } const date = toDate ( dirtyDate ) ; return ! isNaN ( Number ( date ) ) ; }