index.js
function isValid(date) {
  return Object.prototype.toString.call(date) == '[object Date]' && !isNaN(date.getTime());
}
function isValid(date) {
  return Object.prototype.toString.call(date) == '[object Date]' && !isNaN(date.getTime());
}
function isValid ( date ) { return Object . prototype . toString . call ( date ) == '[object Date]' && ! isNaN ( date . getTime ( ) ) ; }
Validate 'date' object
@param {Date} date
@returns {Boolean}
Validate date object