- From: <bugzilla@jessica.w3.org>
- Date: Tue, 03 May 2016 10:30:37 +0000
- To: public-qt-comments@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=29555 --- Comment #10 from Michael Kay <mike@saxonica.com> --- ACTION A-641-02 (bug 29555) MK to propose a precise algorithm for computing min and max width of a format-date component; also define an error when min>max. I propose the following rules, which apply when (a) the component in question is an ordinary integer-valued component (specifically, one of MDdFWwHhms), and (b) the first presentation modifier takes the form of a decimal digit pattern 1. If there is no width modifier, then the value is formatted according to the rules of the format-integer function. 2. If there is a width modifier, then the first presentation modifier is adjusted as follows: 2.a The number of mandatory-digit-sign characters in the presentation modifier is increased if necessary. This is done first by replacing optional-digit-signs with mandatory-digit-signs, starting from the right, and then prepending mandatory-digit-signs to the presentation modifier, until the number of mandatory-digit-signs is equal to the minimum width. Any mandatory-digit-signs that are added by this process must use the same decimal digit family as existing mandatory-digit-signs in the presentation modifier if there are any, or ASCII digits otherwise. 2.b The maximum width, if specified, is ignored. The rules for the Year component (Y) are the same except that the year as output is the value of the year component of the supplied value modulo ten to the power N where N is determined as follows: (i) if the width modifier is present and includes a maximum width, then that maximum width (ii) otherwise, if the first presentation modifier takes the form of a decimal-digit-pattern, then the number of optional-digit-signs and mandatory-digit-signs in that decimal-digit-pattern. Finally: we add a rule that if there is a width modifier that specifies both a minumum and maximum width, then FOFD1340 is reported if the minimum is greater than the maximum. -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Tuesday, 3 May 2016 10:30:40 UTC