Re: [testcases] bugs in datetime subtraction

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 UTC