<?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>29546</bug_id>
          
          <creation_ts>2016-03-28 23:40:37 +0000</creation_ts>
          <short_desc>Out-of-range date values</short_desc>
          <delta_ts>2016-04-28 13:11:48 +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>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</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="Michael Kay">mike</reporter>
          <assigned_to name="O&apos;Neil Delpratt">oneil</assigned_to>
          <cc>abel.braaksma</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>125655</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-03-28 23:40:37 +0000</bug_when>
    <thetext>F+O states clearly that processors are only required to support dates with years in the range 0001-9999, yet there are many tests that expect a greater range. Example: prod-CastExpr/CastAs419 [xs:date(&quot;-0012-12-03-05:00&quot;) cast as xs:date].

I think that such tests should have an alternative result of FODT0001.

In the case of the corresponding Castable tests, I think a processor that does not support the required range of values is expected to return false. This means that for a test such as CastableAs419 [xs:date(&quot;-0012-12-03-05:00&quot;) castable as xs:date], both true and false are acceptable results.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125693</commentid>
    <comment_count>1</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2016-04-02 15:51:16 +0000</bug_when>
    <thetext>&gt; xs:date(&quot;-0012-12-03-05:00&quot;) castable as xs:date
I don&apos;t see how that can return false, because the constructor is called first, raising an exception (FODT0001) before it can test whether the returned date is castable.

Unless you mean that a processor may shortcut this expression, when &quot;seeing&quot; that there is an xs:date constructor function, it is always castable as xs:date? Though I think such shortcut is not allowed here, as it would mean that you can get different results.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126253</commentid>
    <comment_count>2</comment_count>
    <who name="O&apos;Neil Delpratt">oneil</who>
    <bug_when>2016-04-28 13:11:48 +0000</bug_when>
    <thetext>Added alternative result FODT0001 as suggested in comment #0.
Fixes made in test cases in the following test sets:

prod-CastExpr
prod-CastableExpr
fn-year-from-date</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>