Answers for "how to verify timestamp format in javascript"

0

how to verify timestamp format in javascript

var valid = (new Date(timestamp)).getTime() > 0;

var valid = (new Date('2012-08-09')).getTime() > 0; // true
var valid = (new Date('abc')).getTime() > 0; // false
Posted by: Guest on March-20-2020

Code answers related to "how to verify timestamp format in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language