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

RE: Clarification request on xsd datatypes that "Appendix E Adding durations to dateTimes" applies to

From: Ashok Malhotra <ashokma@microsoft.com>
Date: Fri, 27 Feb 2004 12:36:36 -0800
Message-ID: <EDB607C8AC991F40BE646533A1A673E80164CD2A@RED-MSG-42.redmond.corp.microsoft.com>
To: "Joseph Fialli" <Joseph.Fialli@Sun.COM>, <www-xml-schema-comments@w3.org>
Yes, it does appear that the two datatypes you mention should have been
included in the third sentence in Appendix E.

But the sentence is not satisfactory as it stands.  The algorithm deals
only with adding a duration to a dateTime.  It works for the

other datatypes mentioned in so far as an instance of one of these
document can be converted to a dateTime but it says nothing 

about how this may be done.  For a date it seems reasonable to convert
it to a dateTime  by adding the starting instant for that date

00:00:00. For other datatypes it is not always obvious.  For time you
would have to pick an arbitrary date, for example.

All the best, Ashok 


From: www-xml-schema-comments-request@w3.org
[mailto:www-xml-schema-comments-request@w3.org] On Behalf Of Joseph
Sent: Friday, February 27, 2004 11:24 AM
To: www-xml-schema-comments@w3.org
Subject: Clarification request on xsd datatypes that "Appendix E Adding
durations to dateTimes" applies to


Link: http://www.w3.org/TR/xmlschema-2/#adding-durations-to-dateTimes

Clarification Comment:
The XSD builtin datatypes, gMonthDay and time,  are missing from the
sentence below "This appendix also addresses the
additions of durations to the datatypes ......".  Since Section 3.2.12
gMonthDay and Section 3.2.8 time contain a
reference to Appendix E, one would conclude they should also be listed
in this sentence to confirm that the add duration 
algorithm also applies to these two types.

Context for clarification:

E Adding durations to dateTimes

Given a dateTime <http://www.w3.org/TR/xmlschema-2/#dateTime>  S and a
duration <http://www.w3.org/TR/xmlschema-2/#duration>  D, this appendix
specifies how to compute a dateTime
<http://www.w3.org/TR/xmlschema-2/#dateTime>  E where E is the end of
the time period with start S and duration D i.e. E = S + D. Such
computations are used, for example, to determine whether a dateTime
<http://www.w3.org/TR/xmlschema-2/#dateTime>  is within a specific time
period. This appendix also addresses the addition of duration
<http://www.w3.org/TR/xmlschema-2/#duration> s to the datatypes date
<http://www.w3.org/TR/xmlschema-2/#date> , gYearMonth
<http://www.w3.org/TR/xmlschema-2/#gYearMonth> , gYear
<http://www.w3.org/TR/xmlschema-2/#gYear> , gDay
<http://www.w3.org/TR/xmlschema-2/#gDay>  and gMonth
<http://www.w3.org/TR/xmlschema-2/#gMonth> , which can be viewed as a
set of dateTime <http://www.w3.org/TR/xmlschema-2/#dateTime> s. In such
cases, the addition is made to the first or starting dateTime
<http://www.w3.org/TR/xmlschema-2/#dateTime>  in the set.


-Joe Fialli, Sun Microsystems
Received on Friday, 27 February 2004 15:36:42 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:09:01 UTC