- From: <bugzilla@jessica.w3.org>
- Date: Thu, 14 Jul 2011 20:12:46 +0000
- To: www-xml-schema-comments@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=13260
Summary: dateTime time-on-timeline incorrect for BCE years?
Product: XML Schema
Version: 1.1 only
Platform: PC
OS/Version: Windows NT
Status: NEW
Severity: normal
Priority: P2
Component: Datatypes: XSD Part 2
AssignedTo: David_E3@VERIFONE.com
ReportedBy: alexhall@revelytix.com
QAContact: www-xml-schema-comments@w3.org
CC: cmsmcq@blackmesatech.com
Step 3a of http://www.w3.org/TR/xmlschema11-2/#vp-dt-timeOnTimeline (leap-year
days correction) does not take into account the fact that 1BCE (='0000' in
dateTime lexical form) is a leap year. As a result, the calculated
time-on-timeline value is off by one day for all BCE dates.
Applying the algorithm as written, I came up with the following timeline
values:
ToTl("0001-01-01T00:00:00Z") = 0
ToTl("0000-12-31T00:00:00Z") = 0 (should be -86400)
I believe the following modifications to the ToTl will correct this problem:
1. Remove the -1 offset from the definition of yr:
* Let yr be 1972 when dt's year is absent, and dt's year otherwise.
2. Include the -1 offset in step 2a:
* Set ToTl to 31536000 x (yr - 1)
3. Change the leap-year adjustment in step 3a as follows:
* Add 86400 * ((yr - 4) div 4 - (yr - 100) div 100 + (yr - 400) div 400) to
ToTl
--
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Thursday, 14 July 2011 20:12:51 UTC