Re: Length of a day.

Hi Eric,

     In [1], you wrote:

---- Start of Eric's note ----

I wonder if the W3C XML Schema recommendation is conform to ISO 8601 on 
the issue of the length of a day.

W3C XML Schema:
--------------

3.2.9 date

[Definition:]  date represents a calendar date. The ˇvalue spaceˇ of 
date is the set of Gregorian calendar dates as defined in § 5.2.1 of 
[ISO 8601]. Specifically, it is a set of one-day long, non-periodic 
instances e.g. lexical 1999-10-26 to represent the calendar date 
1999-10-26, independent of how many hours this day has.

ISO 8601:
--------
§ 5.2.1 doesn't say what a "date" is, but this is defined in the "3 
Terms and definition":

3.3 date, calendar: A particuliar day of the calendar year

and

3.5 day: A period of 24 hours starting at 0000 and ending at 2400

---- End of Eric's note ----

     I looked into this, and noticed that the definition of "calendar 
date" changed from ISO 8601:1988 to ISO 8601:2000.  The definitions you 
cite appear to be those from ISO 8601:1988.  The new definitions are as 
follows:

3.3
date, calendar
identification of a particular calendar day by its calendar year, its 
calendar month and its ordinal number within its calendar month

3.6
day
unit of time of 24 hours

3.7
day, calendar
time-interval starting at [0000] and ending at [2400] (which is equal to 
the beginning of the next calendar day); typically a calendar day has a 
duration of 24 h

     A pair of notes then follow, the second of which describes the 
situations in which a calendar day might not be 24 hours in length.

     So the current version of ISO 8601 distinguishes between a "day", 
which is always precisely 24 hours, and a "calendar day", whose duration 
may differ due to leap seconds, etc.  So I believe the use of the term 
"calendar date" in 3.2.9 of the "XML Schema:  Datatypes" Recommendation is 
consistent with the definitions of ISO 8601:2000.

     Having said that, there are a couple of minor editorial problems with 
3.2.9.  The first is the use of the term "a set of one-day long, 
non-periodic instances":  a calendar day is not necessarily a day long, 
according to ISO 8601.  The second is that 3.2.9 states that the value 
space of date is the set of dates as defined in 5.2.1 of ISO 8601:  5.2.1 
of ISO 8601 actually defines the lexical form of calendar dates, and it's 
probably the definitions of section 3 of ISO 8601 that best describe the 
value space.  But those are pretty minor points.

Thanks,

Henry
[1] http://lists.w3.org/Archives/Public/www-xml-schema-comments/2001OctDec/0102.html
------------------------------------------------------------------
Henry Zongaro      XML Parsers development
IBM SWS Toronto Lab   Tie Line 969-6044;  Phone (905) 413-6044
mailto:zongaro@ca.ibm.com

Received on Tuesday, 18 December 2001 10:08:21 UTC