Google calendar throws at me rfc3339, but all my dates are in those milliseconds since jan 1970.
rfc3999:
2012-07-04T18:10:00.000+09:00
javascript current time: (new Date()).getTime():
1341346502585
I prefer the the milliseconds because I only deal in countdowns and not in dates.
Datetimes in that format, with 3 decimal places and a “T”, have well-defined behaviour when passed to
Date.parseor theDateconstructor:You have to be careful to always provide inputs that conform to the JavaScript specification, though, or you might unknowingly be falling back on implementation-defined parsing, which, being implementation-defined, isn’t reliable across browsers and environments. For those other formats, there are options like manual parsing with regular expressions:
or full-featured libraries like Moment.js.