W3C home > Mailing lists > Public > public-qt-comments@w3.org > July 2016

[Bug 29749] [fo31] Rounding of fractional seconds in format-time()

From: <bugzilla@jessica.w3.org>
Date: Fri, 22 Jul 2016 15:29:09 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-29749-523-YuD8cukk3u@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=29749

--- Comment #1 from Michael Kay <mike@saxonica.com> ---
It's hard to come up with a fully satisfactory solution to this.

I think we should rule out all solutions that attempt to round 01.9999
"properly" to 02.0000, changing the seconds value, because it would be very
disruptive for the formatting of one component to affect the output of another.

I think there are two possible choices:

(A) Abandon rounding and switch to truncation. Truncation always works and is
consistent with the general approach of the function: if the value is 12:59:59
and you choose not to output the seconds, the output is 12:59, not 13:00. It's
an incompatible change, but it's a change to something that can never have
worked properly.

(B) Specify that if rounding the fractional seconds would cause the seconds
value to change, we truncate instead. So 1.9999 "rounds" to 1.99.

I think my preference is to take the compatibility hit and go for (A).

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Friday, 22 July 2016 15:29:17 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:58:01 UTC