W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2002

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

From: Ashok Malhotra <ashokma@microsoft.com>
Date: Fri, 20 Sep 2002 12:47:33 -0400 (EDT)
Message-ID: <E5B814702B65CB4DA51644580E4853FB03DA736C@red-msg-12.redmond.corp.microsoft.com>
To: "Kay, Michael" <Michael.Kay@softwareag.com>, "Natalie Gordon" <nfg@decisionsoft.com>, <public-qt-comments@w3.org>

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
should still be positive, because it represents the number of months
the start of the year, so month 2 is later than month 1 regardless
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		  
Pathan Open Source XPath 2:
Received on Friday, 20 September 2002 13:36:54 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:10 UTC