Hacker News new | ask | show | jobs
by bagol 337 days ago
I'm curious how would a formal spec define those behaviors.
2 comments

IIRC it was basically undefined, some data formats were defined. Eventually it was specified that it must correctly parse RFC 3339 and everything was browser defined. I think in the name of web compatibility they have started to carefully define the legacy behaviours of common browsers.

But the morale of this story should be if you need a date from a user user a date input and if you need to parse a computer-readable date always use UNIX timestamps or RFC 3339 (which are correctly and consistently supported).

It's one of the [incorrect] answers to these questions: "Throws an error".