W3C home > Mailing lists > Public > public-rif-wg@w3.org > March 2010

Re: [testcases] bugs in datetime subtraction

From: Stella Mitchell <stellamit@gmail.com>
Date: Mon, 22 Mar 2010 21:25:32 -0400
Message-ID: <d64b0f2c1003221825m19782968neca5bcdf339453dc@mail.gmail.com>
To: Gary Hallmark <gary.hallmark@oracle.com>
Cc: RIF WG <public-rif-wg@w3.org>
I changed those three lines in the Builtins_Time testcase and changed the
status from Approved to Proposed.

Stella

On Mon, Mar 22, 2010 at 3:40 PM, Gary Hallmark <gary.hallmark@oracle.com>wrote:

> Hi Stella,
>
> I agree with your changes. Thanks.
>
> Stella Mitchell wrote:
>
>> Gary,
>>  Thank you for finding these bugs.  I would make the following changes to
>> your answers. Do you agree?
>>  On Tue, Mar 16, 2010 at 6:57 PM, Gary Hallmark <gary.hallmark@oracle.com<mailto:
>> gary.hallmark@oracle.com>> wrote:
>>
>>
>>    External( func:subtract-dateTimes(
>>    "2000-10-30T06:12:00Z"^^xs:dateTime
>>    "1999-11-28T09:00:00Z"^^xs:dateTime) ) =
>>    "P337DT21H12M"^^xs:dayTimeDuration
>>    External( func:subtract-dates( "2000-10-30"^^xs:date
>>    "1999-11-28"^^xs:date ) ) = "P338D"^^xs:dayTimeDuration
>>    External( func:subtract-times( "11:12:00Z"^^xs:time
>>    "04:00:00Z"^^xs:time ) ) = "PT7H12M"^^xs:dayTimeDuration
>>
>>  External( func:subtract-dateTimes(
>> "2000-10-30T06:12:00*-05:00*"^^xs:dateTime
>> "1999-11-28T09:00:00Z"^^xs:dateTime) ) = "P337DT*2*H12M"^^xs:dayTimeDuration
>>
>>
>>       (This was the original intent, I think, to match the example given
>> at the end of
>> http://www.w3.org/TR/xpath-functions/#func-subtract-dateTimes , and it
>> adds some variety to the subtract-times line where both arguments have the
>> same timezone
>>
>> External( func:subtract-dates( "2000-10-30*Z*"^^xs:date
>> "1999-11-28*Z*"^^xs:date ) ) = "P*337*D"^^xs:dayTimeDuration
>>
>>       (Adding Z because RIF DTB requires explicit timezones.  Check your
>> count of the duration from the first instant of 1999-11-28 to the first
>> instant of 2000-10-30? and take into account that the first example at the
>> end of http://www.w3.org/TR/xpath-functions/#func-subtract-dates says 337
>> is the right answer)
>>  Stella  On Tue, Mar 16, 2010 at 6:57 PM, Gary Hallmark <
>> gary.hallmark@oracle.com <mailto:gary.hallmark@oracle.com>> wrote:
>>
>>    In the BuiltinsTime test case, I think the following
>>
>>    External( func:subtract-dateTimes(
>>    "2000-10-30T06:12:00"^^xs:dateTime
>>    "1999-11-28T09:00:00Z"^^xs:dateTime) ) =
>>    "P337DT2H12M"^^xs:dayTimeDuration
>>    External( func:subtract-dates( "2000-10-30"^^xs:date
>>    "1999-11-28"^^xs:date ) ) = "P337D"^^xs:dayTimeDuration
>>    External( func:subtract-times( "11:12:00Z"^^xs:time
>>    "04:00:00"^^xs:time ) ) = "PT2H12M"^^xs:dayTimeDuration
>>
>>    should be changed to
>>
>>    External( func:subtract-dateTimes(
>>    "2000-10-30T06:12:00Z"^^xs:dateTime
>>    "1999-11-28T09:00:00Z"^^xs:dateTime) ) =
>>    "P337DT21H12M"^^xs:dayTimeDuration
>>    External( func:subtract-dates( "2000-10-30"^^xs:date
>>    "1999-11-28"^^xs:date ) ) = "P338D"^^xs:dayTimeDuration
>>    External( func:subtract-times( "11:12:00Z"^^xs:time
>>    "04:00:00Z"^^xs:time ) ) = "PT7H12M"^^xs:dayTimeDuration
>>
>>
>>
>>
>>
>>
>>
Received on Tuesday, 23 March 2010 01:26:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 23 March 2010 01:26:07 GMT