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 3040 - Date and dateTime formats do not allow some valid ISO 8601 values
Summary: Date and dateTime formats do not allow some valid ISO 8601 values
Status: CLOSED INVALID
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Datatypes: XSD Part 2 (show other bugs)
Version: 1.0/1.1 both
Hardware: PC Windows 2000
: P2 trivial
Target Milestone: ---
Assignee: C. M. Sperberg-McQueen
QA Contact: XML Schema comments list
URL:
Whiteboard: important, work
Keywords: noResponse
Depends on:
Blocks:
 
Reported: 2006-03-24 04:51 UTC by John Hockaday
Modified: 2006-10-30 02:38 UTC (History)
1 user (show)

See Also:


Attachments

Description John Hockaday 2006-03-24 04:51:16 UTC
Valid ISO 8601 date formats are:

19 for the 1900's
1990/1999 for the 1990's
1990 for the year 1990
1990-12 for December 1990

These are necessary for the recording of dates that are not well defined.  For example, publication may have occured sometime in the 1990's but the exact year is not know.  Therefore, the 1990/1999 format is necessary for these dates. The "/" is a valid ISO 8601 format to define a range of dates. Similarly something may have happened in the 20th century so the valid ISO 8601 format 19 should be allowed.  This will help indicate the accuracy of the stated dates.

dateTime formats force us to use hours minutes and seconds.  Valid ISO 8601 formats are:

19990101T12
19990101T12+11
1999-01-01T12:30
1999-01-01T12:30+11

These formats should be available in XML Schema.  Often people will want to state rough times, ie the hour, for dateTime formats.  It is often very relevant to state the time zone so these should be allowed.  No-one should be forced to enter dateTimes to the nearest second.  It is often not relevant yet showing those values gives a false indication of the accuracy of the dateTime measurement.

There is an ambiguity with the definition of centuries and the 100BC/100AD years.  Does 19 equal the 1900's or does it equal 19AD?  ISO 8601 states that 19 equals the 1900's AD.  Therefore using 10 for 10 AD should not be allowed.  It really represents the 1000's.  The format 0010 should be used for the year 10 AD and -0010 should be used for year 10 BC.  

Please implement ISO 8601 propoerly.

Thank you.


John
Comment 1 Dave Peterson 2006-09-11 18:21:14 UTC
(In reply to comment #0)

> There is an ambiguity with the definition of centuries and the 100BC/100AD
> years.  Does 19 equal the 1900's or does it equal 19AD?  ISO 8601 states that
> 19 equals the 1900's AD.  Therefore using 10 for 10 AD should not be allowed. 
> It really represents the 1000's.  The format 0010 should be used for the year
> 10 AD and -0010 should be used for year 10 BC.  

The lexical representations as defined require a minimum of four digits in the year fragment of date/time representations having a year fragment.  I believe you have misunderstood the spec in that regard.
Comment 2 John Hockaday 2006-09-27 01:37:28 UTC
I'm not sure what spec you are suggesting I have misunderstood.  I am referring to ISO 8601:2004 section 4.1.2.3 "Representation with reduced accuracy".  It provides very clear definitions of this representation with three examples as follows:

"1985-04" for a specific month of a specific year, 
"1985" for a specfic year and
"19" for a specific century.

I don't see how I can misunderstand the content of section 4.1.2.3 of ISO 8601:2004 in this respect.

It seems to me that you have not allowed for this very important reduced accuracy representation of dates as it is *very* common for only the century, year or month to be known.

I look forward to your response to this need.

Thanks.


John
Comment 3 Dave Peterson 2006-09-27 03:21:47 UTC
(In reply to comment #2)
> I'm not sure what spec you are suggesting I have misunderstood.  I am referring
> to ISO 8601:2004 section 4.1.2.3 "Representation with reduced accuracy". 

That was understood'; however by "the spec" I meant the Schema Recommendation you are commenting on.  When you ask whether '19' can be the lexical representation of the year 19 CE (AD), that tells me you don't understand the Schema Rec.  It's quite clear that lexical representations of years must have at least four digits.

Specivically, (In reply to comment #0)

>                          Therefore using 10 for 10 AD should not be allowed. 
>It really represents the 1000's.  The format 0010 should be used for the year
>10 AD and -0010 should be used for year 10 BC.

The two-digit character string '10' is not allowed by the Schema Rec as a lexical representation of the year 10 CE (AD); the only acceptable lexical representation is '0010'.  However, using the standard notation adopted by astronomers many years ago and which is adopted by the Schema Rec and is specified by ISO 8601:2000, '-0010' turns out to represent the year -11 BCE (BC) (since the year 0000 is -1 BCE, -0001 is -2 BCE, etc.  (I don't have a copy of ISO 8601:2004, so I can't verify that they didn't change their mind four years later--but I've been led to believe that they did not.)
Comment 4 Dave Peterson 2006-10-02 01:11:07 UTC
The WG has decided it cannot comply whith this comment.  The commenter has been notified in
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2006OctDec/0000.html .