RE: F&O Question about extraction from negative date/duration va lues

Mike is correct.  Only the year component in dateTime values can have a
negative sign.  I'll try and add some words that clarify this.

All the best, Ashok 
===========================================================
Ashok Malhotra              <mailto: ashokma@microsoft.com> 
Microsoft Corporation
212 Hessian Hills Road
Croton-On-Hudson, NY 10520 USA 
Redmond: 425-703-9462                New York: 914-271-6477 



-----Original Message-----
From: Kay, Michael [mailto:Michael.Kay@softwareag.com] 
Sent: Friday, September 20, 2002 8:53 AM
To: Natalie Gordon; public-qt-comments@w3.org
Subject: RE: F&O Question about extraction from negative date/duration
va lues


> I've made the assumption that extracting from a negative 
> yearMonthDuration, dayTimeDuration, dateTime, and date 
> returns a negative 
> value (as opposed to the component's absolute value).  Is 
> that a correct 
> assumption?

I believe it's correct for durations but not for absolute dates and
dateTimes. In the latter case, I think the months value for a negative
year
should still be positive, because it represents the number of months
AFTER
the start of the year, so month 2 is later than month 1 regardless
whether
the year is negative or positive. Only the year value should be signed.

You are quite right to point out that the spec needs to make a clear
statement on this.

Michael Kay

> 
> If it is, then there's a problem with the inclusive 
> statements 8.4.10 - 
> 8.4.12 (eg. "The hours value ranges from 0 to 23, inclusive").
> 
> If this assumption is not correct, then should there be a 
> is-positive function (or an equivalent statement) for these 
> datetypes?  
> 
> Cheers,
> Natalie
> 
> -- 
> Natalie Gordon, Software Engineer	  DecisionSoft Ltd.
> Telephone: +44 (0) 1865 203192		  
http://www.decisionsoft.com
Pathan Open Source XPath 2:
http://software.decisionsoft.com

Received on Friday, 20 September 2002 13:36:54 UTC