Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check date format javascript

 if (date.match(/^d{4}-d{2}-d{2}$/) === null) {
   //it is not a date with format YYYY-MM-DD
 }
else 
  //it is a date with format YYYY-MM-DD
 
PREVIOUS NEXT
Tagged: #check #date #format #javascript
ADD COMMENT
Topic
Name
6+8 =