From:  Morgan Reece <winter2718@gmail.com>
Date:  09 Jun 2016 05:28:59 Hong Kong Time
Newsgroup:  news.mozilla.org/mozilla.dev.tech.js-engine.internals
Subject:  

Improving Date.parse

NNTP-Posting-Host:  63.245.214.181

Hi all,

Date.parse has been breaking cross-engine compatibility for over a decade
now, and it's easy to see why when reading the spec:

20.3.3.2 :

   "The function first attempts to parse the format of the String according
   to the rules (including extended years) called out in Date Time String
   Format (20.3.1.16). If the String does not conform to that format *the
   function may fall back to any implementation-specific heuristics or
   implementation-specific date formats*."


After spending some time looking at the date parsers in SpiderMonkey, V8,
and Chakra I think the most sensible way to fix this situation once and for
all is to create a date parsing grammar and lobby to have it put into the
spec. I've been fiddling around with a working implementation for the past
few days and would appreciate any feedback or improvements.

You can find it at: http://mrrrgn.com/date/

My next step will be to actually write up the proposal (in the readme of
the github repo found from that link), extra eyes on that would be nice as
well!

Thanks,

Morgan