const DATE_TAG = '[object Date]' ; const toString = Object . prototype . toString ; hidden export function isValidDate ( date ) { return date && toString . call ( date ) === DATE_TAG && ! isNaN ( date ) ; }