Comment #5 on issue 944 by sideshowbarker: TimeComposer broken for times
with milliseconds values that have only 1 or 2 digits
http://code.google.com/p/v8/issues/detail?id=944
I'd be glad to write up a patch for accepting only the mandated number of
digits in all the fields, if that's the decision.
But as far as other current browser/engine behavior, note that current JSC
in WebKit nightlies does do liberal parsing of times. See
http://trac.webkit.org/browser/trunk/JavaScriptCore/wtf/DateMath.cpp?rev=69833#L636
[[
// We are more lenient than ES5 by accepting more or less than 3
fraction digits.
]]
As far as what the ES5 spec says, note that section 15.9.4.2, "Date.parse
(string)" says this:
http://sideshowbarker.github.com/es5-spec/#x15.9.4.2
[[
The function first attempts to parse the format of the String according to
the rules called out in Date Time String Format (15.9.1.15). If the String
does not conform to that format the function may fall back to any
implementation-specific heuristics or implementation-specific date formats.
]]
But like I said, I'd be glad to write up a patch for accepting only the
mandated number of digits in all the fields, if that's the decision. Please
let me know if that's what I should go ahead and do.
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev