Looking for JavaScript(V8)-compilant parser

Hi Cafe, tl;dr: I'm wondering if there are existing parsers for parsing any dateString that can be accepted by `Date.parse` of JavaScript(V8). The input looks like "Fri, 08 February 2019 12:34:56 +0900". At first I checked [MDN]( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Obj...) and turns out it's very close to [IETF-compliant RFC 2822 timestamps]( https://tools.ietf.org/html/rfc2822#page-14), but not quite: as I then found [hsemail]( http://hackage.haskell.org/package/hsemail-2/docs/Text-Parsec-Rfc2822.html) to be promising, but it rejected "Fri, 08 February 2019 12:34:56 +0900" but accepted "Fri, 08 Feb 2019 12:34:56 +0900" (notice that RFC2822 does not accept full month name). Refering to language spec doesn't help ( http://www.ecma-international.org/ecma-262/5.1/#sec-15.9.4.2), as it doesn't mention RFC2822 at all. So it seems `Data.parse` accepts a superset of RFC2822 and a version of ISO8601 (as described in MDN above) but I'm not sure what exactly is the accepting set of inputs. Before I start working on a quick and dirty solution (it should work patching hsemail to accept full month name) I want to know if there are existing parsers for this purpose? Thanks! -- Javran (Fang) Cheng
participants (1)
-
Javran Cheng