[Bug 29765] New: [FO31] 9.8.4.4 Formatting the Year Component

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

            Bug ID: 29765
           Summary: [FO31] 9.8.4.4 Formatting the Year Component
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Functions and Operators 3.1
          Assignee: mike@saxonica.com
          Reporter: tim@cbcl.co.uk
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

Under "9.8.4.4 Formatting the Year Component" the text says

"The rules for the Year component (Y) are the same as those in 9.8.4.3
Formatting Integer-Valued Date/Time Components, except that the value of 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:

1.    If the width modifier is present and includes a maximum width, then that
maximum width, or 2, whichever is greater.

2.    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, or 2, whichever is
greater."


It's not clear whether a width modifier of the form:

  2-*

is considered to include a maximum width.

Consider the formats

(A) [Y0,3]
(B) [Y0,3-6]
(C) [Y0,3-*]

In (A), a width modifier is present, but does not include a maximum width. 
Therefore N = 2 (rule 2 applies).  This seems odd.  Surely the maximum width is
unbounded?

In (B), a width modifier is present, width a maximum width.  Therefore N = 
max(6, 2), i.e. N = 6 (rule 1 applies).

In (C), a width modifier is present, includes a maximum width, but the maximum
width does not have an integer value.



This relates to test case format-date-043.

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

Received on Friday, 5 August 2016 10:53:48 UTC