This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 29769 - [Qt3TS] format-date-en122
Summary: [Qt3TS] format-date-en122
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: O'Neil Delpratt
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-10 15:52 UTC by Tim Mills
Modified: 2016-09-20 12:03 UTC (History)
1 user (show)

See Also:


Attachments

Description Tim Mills 2016-08-10 15:52:07 UTC
Under the rules for formatting the year component, 

'[Y1o]'

will cause the year to be formatted as two-digit only, because

component specifier = Y (year)
first presentation modifier = 1 (a decimal-digit-pattern)
second presentation modifier = o
width modifier = (absent)
N = 2 (the greater of 2 and 1).
Comment 1 Tim Mills 2016-08-19 13:21:32 UTC
I have taken the liberty of fixing this.
Comment 2 Michael Kay 2016-09-13 17:36:29 UTC
Under the resolution of spec bug 29765, the picture [Y1o] no longer causes truncation of the year value. I have therefore reverted the expected results.
Comment 3 Tim Mills 2016-09-14 15:43:04 UTC
This change to the testsuite doesn't appear to have been committed.
Comment 4 O'Neil Delpratt 2016-09-20 11:42:49 UTC
Closing this bug as it looks like the fix has been committed now to cvs.
Comment 5 Tim Mills 2016-09-20 11:55:26 UTC
It doesn't seem fixed to me.  I see:

<test-case name="format-date-en122">
      <description>English ordinal numbers 1990-2020</description>
      <created by="Michael Kay, Saxonica" on="2011-07-01"/>
      <modified by="Tim Mills" on="2011-07-01" change="Bug 29769" />
      <environment>
         <param name="d" as="xs:date" select="xs:date('1990-12-01')"/>
      </environment>
      <dependency type="language" value="en"/>
      <test>for $i in 0 to 30 return let $d2 := $d + xs:yearMonthDuration('P1Y')*$i return
         format-date($d2, '[Y1o]', 'en', (), ()) </test>
      <result>
         <assert-string-value normalize-space="true">
            90th 91st 92nd 93rd 94th 95th 96th 97th 98th 99th
            0th 1st 2nd 3rd 4th 5th 6th 7th 8th 9th 10th 11th
            12th 13th 14th 15th 16th 17th 18th 19th 20th
         </assert-string-value>
      </result>
   </test-case>
Comment 6 Michael Kay 2016-09-20 12:01:52 UTC
I'm puzzled. I see:

<test-case name="format-date-en122">
      <description>English ordinal numbers 1990-2020</description>
      <created by="Michael Kay, Saxonica" on="2011-07-01"/>
      <modified by="Tim Mills" on="2016-08-19" change="Bug 29769" />
      <modified by="Michael Kay" on="2016-09-13" change="Bug 29765" />
      <environment>
         <param name="d" as="xs:date" select="xs:date('1990-12-01')"/>
      </environment>
      <dependency type="language" value="en"/>
      <test>for $i in 0 to 30 return let $d2 := $d + xs:yearMonthDuration('P1Y')*$i return
         format-date($d2, '[Y1o]', 'en', (), ()) </test>
      <result>
         <assert-string-value normalize-space="true">
            1990th 1991st 1992nd 1993rd 1994th 1995th 1996th 1997th 1998th 1999th
            2000th 2001st 2002nd 2003rd 2004th 2005th 2006th 2007th 2008th 2009th 2010th 2011th
            2012th 2013th 2014th 2015th 2016th 2017th 2018th 2019th 2020th
         </assert-string-value>
      </result>
   </test-case>
Comment 7 Tim Mills 2016-09-20 12:02:54 UTC
Hmmm... my CVS client seems to be hung.

I'll presume it's fixed.