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 29546 - Out-of-range date values
Summary: Out-of-range date values
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Candidate Recommendation
Hardware: PC All
: 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-03-28 23:40 UTC by Michael Kay
Modified: 2016-04-28 13:11 UTC (History)
1 user (show)

See Also:


Attachments

Description Michael Kay 2016-03-28 23:40:37 UTC
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("-0012-12-03-05:00") 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("-0012-12-03-05:00") castable as xs:date], both true and false are acceptable results.
Comment 1 Abel Braaksma 2016-04-02 15:51:16 UTC
> xs:date("-0012-12-03-05:00") castable as xs:date
I don'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 "seeing" 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.
Comment 2 O'Neil Delpratt 2016-04-28 13:11:48 UTC
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