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: Kay, Michael <Michael.Kay@softwareag.com>
Date: Fri, 20 Sep 2002 17:53:05 +0200
Message-ID: <DFF2AC9E3583D511A21F0008C7E621060453DB9F@daemsg02.software-ag.de>
To: Natalie Gordon <nfg@decisionsoft.com>, public-qt-comments@w3.org

> 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		  
Pathan Open Source XPath 2:		  http://software.decisionsoft.com
Received on Friday, 20 September 2002 11:53:14 UTC

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