This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
In format-date-044 format "[Y#.0,2]" has width formatter "2" which has no max width, and thus should not truncate the year
This was added to test comment 10 of bug 29555. In this case, year should be truncated. Closing as invalid but you can reopen if you disagree after reviewing the comment.
>(i) if the width modifier is present and includes a maximum width, I was thinking if the modifier is there, then it always has an implicit maximum.
It is also not clear what happens to fractions with such a format format-time(xs:time("12:22:33.123456"), "[f#.0,2]") The fraction truncation should probably be consistent with the year truncation
(In reply to Benito van der Zander from comment #3) > It is also not clear what happens to fractions with such a format > > format-time(xs:time("12:22:33.123456"), "[f#.0,2]") > > The fraction truncation should probably be consistent with the year > truncation In Bug 29555, comment 3, the proposal is (and I think it was accepted) that the first presentation modifier *must* follow the pattern "\d+#*". Your pattern is therefore not allowed (the "." should not appear there and the "0" cannot follow the "#"). The proper way to express a min width of 2 would be: format-time(xs:time("12:22:33.123456"), "[f0#,2]") or: format-time(xs:time("12:22:33.123456"), "[f0,2]") or: format-time(xs:time("12:22:33.123456"), "[f00]") Note that the first two expressions above have a max width of infinity according to that same comment. To force a max of two digits, one has to write: format-time(xs:time("12:22:33.123456"), "[f0#,2-2]") or: format-time(xs:time("12:22:33.123456"), "[f0,2-2]")
Then compare the output of format-time(xs:time("12:22:33.123456"), "[f00,2]") and format-date(xs:date('2016-01-01'), '[Y00,2]')
Benito, if you think we need consistency in these cases, can you either file a new bug against the specification or make the comment on bug 29555?