Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

new date javascript invalid date

if (Object.prototype.toString.call(d) === "[object Date]") {
  // it is a date
  if (isNaN(d.getTime())) {  // d.valueOf() could also work
    // date is not valid
  } else {
    // date is valid
  }
} else {
  // not a date
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #date #javascript #invalid #date
ADD COMMENT
Topic
Name
4+3 =