W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2011

[whatwg] Time Parsing

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Wed, 15 Jun 2011 14:26:03 +0200
Message-ID: <4DF8A4DB.3010302@lachy.id.au>
On 2011-06-15 07:55, Ian Hickson wrote:
> On Mon, 28 Mar 2011, Lachlan Hunt wrote:
>> This should also only allow up to 3 digits representing milliseconds. If
>> there are 4 or more digits (microseconds or beyond), the spec should
>> state that the remaining digits should be truncated.
>
> Why?

Because the Date object can only handle precision to 3 decimal places, 
and implementations interpret times like "00:59:59.9999" as 
"00:59:59.999" instead of rounding it up to "01:00:00.000"

-- 
Lachlan Hunt - Opera Software
http://lachy.id.au/
http://www.opera.com/
Received on Wednesday, 15 June 2011 05:26:03 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:34 UTC