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 13:33:15 -0800
Message-ID: <EDB607C8AC991F40BE646533A1A673E80164CE1C@RED-MSG-42.redmond.corp.microsoft.com>
To: "Joseph Fialli" <Joseph.Fialli@Sun.COM>
Cc: <www-xml-schema-comments@w3.org>
In the para you refer to S is already a dateTime.  But dateTime
representations do not have optional parts except for timezones.

You can interpret it in the way you suggest but it's not clear what the
intention was.

All the best, Ashok 

________________________________

From: Joseph Fialli [mailto:Joseph.Fialli@Sun.COM] 
Sent: Friday, February 27, 2004 1:24 PM
To: Ashok Malhotra
Cc: www-xml-schema-comments@w3.org
Subject: Re: Clarification request on xsd datatypes that"Appendix E
Adding durations to dateTimes" applies to

 



Ashok Malhotra wrote:

Thanks for your response. My comments below.



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. 

The fifth paragraph from Appendex E.1 states how to handle cases other
than dateTime.  

   "Given a dateTime S and a duration D, ....

   The following is the precise specification. These steps must be
followed in the same order. If a field in D is not specified, it is     
    treated as if it were zero. If a field in S is not specified, it is
treated in the calculation as if it were the minimum allowed 
    value in that field, however, after the calculation is concluded,
the corresponding field in E is removed (set to unspecified)."

For all fields but year, the above is precise enough. However, using the
minimal value for year is not advisable since
it allows for negative values.  It would be preferable if a specific
non-negative year value was specified to precisely define the
operation when year field is not defined.

-Joe

	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
Fialli
	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 16:33:31 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:50:02 UTC