- From: <bugzilla@wiggum.w3.org>
- Date: Wed, 18 Jan 2006 15:35:34 +0000
- To: public-qt-comments@w3.org
- Cc:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=2725 Summary: Incorrect example in section 5.2.1 Product: XPath / XQuery / XSLT Version: Working drafts Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Functions and Operators AssignedTo: ashok.malhotra@oracle.com ReportedBy: lholst@students.cs.uu.nl QAContact: public-qt-comments@w3.org Hi, In section 5.2.1 of the XQuery 1.0 and XPath 2.0 Functions and Operators specification [1], it says: > fn:dateTime(xs:date("1999-12-31"), xs:time("24:00:00")) returns > xs:dateTime("1999-12-31T00:00:00") because "24:00:00" is an alternate lexical > form for "00:00:00". However, to my understanding the ISO 8601 standard says that 00:00 is the beginning of a day, and 24:00 is the end of a day, quote [2]: > As every day both starts and ends with midnight, the two notations 00:00 and > 24:00 are available to distinguish the two midnights that can be associated > with one date. This means that the following two notations refer to exactly > the same point in time: > > 1995-02-04 24:00 = 1995-02-05 00:00 That is, xs:time should not lose information that is explicitly specified in the string it is being constructed from (being "24:00:00" instead of "00:00:00"). It should be stored internally as 24:00:00, and if it is combined with a date should either return "1999-12-31T24:00:00" or "2000-01-01T00:00:00". So, I would suggest the example in the specification to be changed to something like this: fn:dateTime(xs:date("1999-12-31"), xs:time("24:00:00")) returns xs:dateTime("2000-01-01T00:00:00") because "24:00:00" is an alternate lexical form for "00:00:00" on the next day. ~Grauw [1] http://www.w3.org/TR/xpath-functions/#func-dateTime-examples [2] http://www.cl.cam.ac.uk/~mgk25/iso-time.html
Received on Wednesday, 18 January 2006 15:35:42 UTC