I know when creating an object Datein javascript with a parameter dateString, the string should be something that can recognize parse().
What date format can it parserecognize?
For instance:
var postDate = new Date("2011-03-08T23:52:38");
works in Chrome and Internet Explorer, but doesnβt work on iPhone (returned January 1, 1970).
I can not find the official documentation on the method .parse()or constructor about what the parameter should be.
The format yyyy-mm-ddThh:nn:ssdoes not work. What is a valid format string?
source
share