<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>27338</bug_id>
          
          <creation_ts>2014-11-16 14:08:24 +0000</creation_ts>
          <short_desc>fn:parse-ietf-date</short_desc>
          <delta_ts>2014-12-13 23:44:59 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XQuery 3 &amp; XPath 3 Test Suite</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Christian Gruen">christian.gruen</reporter>
          <assigned_to name="Liam R E Quin">liam</assigned_to>
          <cc>mike</cc>
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>114976</commentid>
    <comment_count>0</comment_count>
    <who name="Christian Gruen">christian.gruen</who>
    <bug_when>2014-11-16 14:08:24 +0000</bug_when>
    <thetext>The following tests for fn:parse-ietf-date may need to be fixed (maybe, the F&amp;O 3.1 spec needs to be updated instead):

* parse-ietf-date-15

Test environment:
 &lt;param name=&quot;d&quot; as=&quot;xs:dateTime&quot; select=&quot;xs:dateTime(&apos;2014-08-20T19:36:01Z&apos;)&quot;/&gt; 

Correct:
 &lt;param name=&quot;d&quot; as=&quot;xs:dateTime&quot; select=&quot;xs:dateTime(&apos;2014-09-09T19:36:01Z&apos;)&quot;/&gt; 


* parse-ietf-date-16

Test string:
  ... &quot;Tue,  9 Sep 2014 19:36:01 GMT&quot; ...

Grammar in XQ31 F&amp;O spec only allows single spaces (S?).


* parse-ietf-date-19

Test string:
  ... &quot;Aug-20-2014 19:36&quot; ...

Conflicts with the spec:

  input    ::=  ... (datespec S time) | asctime ...
  datespec ::=  daynum dsep monthname dsep year
  asctime  ::=  monthname dsep daynum S time S year


* parse-ietf-date-20, parse-ietf-date-21, parse-ietf-date-22, parse-ietf-date-23

Conflicts with the spec (see above).


* parse-ietf-date-errs9

Test string:
  ... &quot;Fri, 28 Feb -2000 19:36:01 GMT&quot; ...
  
Is correct, according to the grammar in the spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>114978</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2014-11-16 18:24:24 +0000</bug_when>
    <thetext>Liam, could you comment on this please?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115843</commentid>
    <comment_count>2</comment_count>
    <who name="Liam R E Quin">liam</who>
    <bug_when>2014-12-03 18:58:39 +0000</bug_when>
    <thetext>I&apos;ll look into it today.  At least one is a typo resulting from not having an implementation to test the tests :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115902</commentid>
    <comment_count>3</comment_count>
    <who name="Liam R E Quin">liam</who>
    <bug_when>2014-12-04 03:27:21 +0000</bug_when>
    <thetext>[left open because we should consider changing the grammar]

* parse-ietf-date-15
fixed, thanks!

On whitespace, the description says,
Accepts one or more whitespace characters (x20, x09, x0A, x0D) wherever a single space is required

Probably the grammar should use a + in the definition of S; the grammars I merged to get here were rather imprecise about such things, unfortunately.


* parse-ietf-date-19

fixed, thanks!

* parse-ietf-date-20, parse-ietf-date-21, parse-ietf-date-22, parse-ietf-date-23
fixed (same error)

* parse-ietf-date-errs9
Hah you&apos;re right, the - is taken as a separator. Fixed; the new version should I think be an error. You can&apos;t actually get a negative year in there by the grammar, of course, so unless an implementor tried to cheat by using a parsedate() library function and forgot to test for this case it seems unlikely.

Thanks for the report!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115904</commentid>
    <comment_count>4</comment_count>
    <who name="Liam R E Quin">liam</who>
    <bug_when>2014-12-04 03:31:51 +0000</bug_when>
    <thetext>Actually I opened bug 27338 and will close this one as the tests I think are fixed. Christian, if you find I still have errors, feel free to reopen!

Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116263</commentid>
    <comment_count>5</comment_count>
    <who name="Christian Gruen">christian.gruen</who>
    <bug_when>2014-12-13 17:28:35 +0000</bug_when>
    <thetext>All tests are now passing.. Except for one:

* parse-ietf-date-16

Similar to parse-ietf-date-15 (see my initial comment), the date in the test and the input is different and needs to be aligned.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116264</commentid>
    <comment_count>6</comment_count>
    <who name="Christian Gruen">christian.gruen</who>
    <bug_when>2014-12-13 17:29:50 +0000</bug_when>
    <thetext>Sorry, there are two more: parse-ietf-date-19 and parse-ietf-date-20 still need to be fixed (see my initial comment).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116267</commentid>
    <comment_count>7</comment_count>
    <who name="Liam R E Quin">liam</who>
    <bug_when>2014-12-13 19:08:50 +0000</bug_when>
    <thetext>Fixed. I actually wonder if we should allow a hyphen as well as a space in more places; I made the grammar by combining the ones in the various specs cited, choosing the more flexible rule when there were conflicts. I&apos;d need to check it didn&apos;t introduce an ambiguity but I don&apos;t think so.

I&apos;ve marked this as resolved fixed, feel free to reopen if I failed again :-) (and to open a new bug if you feel we should change the grammar)

Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116268</commentid>
    <comment_count>8</comment_count>
    <who name="Christian Gruen">christian.gruen</who>
    <bug_when>2014-12-13 19:34:26 +0000</bug_when>
    <thetext>Hi Liam, the date strings in query 19 and 20...

  &quot;Aug-20 2014 19:36&quot;

...still don&apos;t comply with the spec. The (currently) expected format is:

  asctime  ::=  monthname dsep daynum S time S year

In short, time and year need to be swapped.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116271</commentid>
    <comment_count>9</comment_count>
    <who name="Liam R E Quin">liam</who>
    <bug_when>2014-12-13 22:46:03 +0000</bug_when>
    <thetext>Hmm, I&apos;ll leave this open, please close if I got it right :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116273</commentid>
    <comment_count>10</comment_count>
    <who name="Christian Gruen">christian.gruen</who>
    <bug_when>2014-12-13 23:44:59 +0000</bug_when>
    <thetext>Looks good! Thanks.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>