W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > January to March 2000

Date and time types

From: Steve Slatcher <Steve_Slatcher@scientia.com>
Date: Tue, 11 Jan 2000 15:10:22 -0000
Message-ID: <01BF5C45.FBB4EB60@sanda.scientia.com>
To: "'www-xml-schema-comments@w3.org'" <www-xml-schema-comments@w3.org>
XML Schema Part2: Datatypes, 17th December 1999:

It seems the draft attempts to follow ISO 8601,
whilst simultaneously trying to extend aspects
of it and add semantics. My general feeling is 
that the proposals are overambitious, taking them 
far beyond what is required of a simple type system.  
I think the purpose of the datatypes in this document
should be to help the construction of correct
applications by limiting flexibility.

I would suggest that there should be 3 date and 
time types: dateTime (CCCYY-MM-DDThh:mm:ss,sss+hh:mm), 
date (CCCYY-MM-DD), and time (hh:mm:ss,sss).
ISO 8601 reduced precision (truncation from right) 
is OK for the date and time types only.  ISO 8601 
truncation is not.

For the duration type, I would go away from ISO 8601
somewhat.  Use lower case characters for hours, 
minutes and seconds (to disambiguate minutes and 
months), and get rid of the unneeded "P" and "T".  
I see no problem with using zeros (implied in some 
examples in the current draft), or omitting units. 
Just require that the units come in the right order.

Specific problems, which you may want to address 
whether or not you accept these proposals, are 
outlined below.

3.2.7.1
=
Presumably the first example should read
P1Y2M3DT10H30M (i.e. the P is omitted in the example).

3.2.7.1
=
From the examples it seems like both left and right
truncation is OK, though only right truncation is
mentioned in the text.  Allowing both left and right 
truncation simultaneously seems to cause ambiguity.  
Is P1347M months or minutes? Perhaps it should be 
PT1347M for minutes?  In which case this should be 
made clear.  I note that ISO 8601 does not mention 
truncated representations of durations at all, though 
they are clearly useful.

3.2.8.1
=
ISO 8601 truncation is not quite as simple as 'Every
two character "unit" of the representation that is
omitted is indicated by a simple hyphen"-"'.  The
truncated, extended, reduced precision format 
for the date I am writing this is 00-01-11.

3.3.18
=
It is stated that a date represents a specific 24 hr
period, but it has a basetype of recurringInstant.
Clearly there is a conflict here.

3.3.18
=
See above for my comment on hyphen truncation.

3.3.18
=
The fifth day of every month example is incorrect.
It was OK until you adopted the extended format which
has additional hyphens.  ISO 8601 says the extended
format is "Not applicable" in this situation.

3.3.18
=
Seems strange that Y10K is addressed here but not 
elsewhere.  Adds further complications to left
truncation using hyphens.

3.3.19.1
=
Presumably truncated times, and times of reduced
precision are acceptable too, though this is not
stated.

3.3.18 and 3.3.19
=
I do not think is is helpful to view dates and
times as subtypes of recurring instances.

Many sections throughout
=
"Accommodation" not "accomodation" (even in the US!)

===
Steve Slatcher
Received on Tuesday, 11 January 2000 10:10:36 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:46 GMT