[Bug 29555] [FO31] 9.8.4.2 The Width Modifier

https://www.w3.org/Bugs/Public/show_bug.cgi?id=29555

--- Comment #2 from Tim Mills <tim@cbcl.co.uk> ---
Regarding fractional seconds, it's not entirely clear whether the function
formats a decimal value, or an integer value corresponding to the number of
milliseconds (or microseconds, or some other division of time based on the
number of decimal digits supported by the implementation's xs:time
representation).

I had this drafted out to send when you responded on this bug...

Consider the formatting of fractional seconds. e.g.

format-time(xs:time('00:00:00.001'), '[f1]')


In this case the fractional seconds is 0.001.  Suppose that the implementation
supports 6 decimal digits in the representation of fractional seconds (i.e.
microseconds).  So in this case 0.001 is represented by the integer 1000 (i.e.
0.001 * 10^6).  

I don't think the specification is entirely clear as to what the full
representation of this value is.  If it were treated like other integers, it
would be 1000, however I suspect the intended answer is 001.

It's not clear how the full representation of the fractional seconds responds
to foramts such as "[f0/0]".  This appears to set a min-width and max-width of
2 characters.   In the case of the fractional seconds component, the value is
rounded to the specified size as if by applying the function
round-half-to-even(fractional-seconds, max-width).  So we need to compute the
full representation of round-half-to-even(1000, 2), i.e. 1000.  Is the full
representation 1/0/0/0, or 0/0/1?  Either way, it's still bigger than the
requested minimum width.

If the input were smaller, such that the full representation was less than the
min-width, the specification advises adding zero digits in the case of the
fractional seconds component.  This would ignore any gropuing specifiers.  Is
that intentional?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 12 April 2016 14:55:20 UTC