This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Both of these queries subtract a little over a day from an xs:date. In both cases the result is one day off - at least I think so. I.e. -7: The query in op-subtract-dayTimeDuration-from-date-7 is: > fn:string(xs:date("1989-07-05Z") - xdt:dayTimeDuration("P01DT09H02M")) Expected result is: 1989-07-04Z I believe it should be 1989-07-03Z as the dayTimeDuration is a little over one day and dates are defined to be starting at 00:00:00, so subtracting a little more than a day and discarding the time part thereafter should yield the 3rd. Same goes for -1, which cites below example, but actually presents different results. See also http://www.w3.org/TR/xpath-functions/#func-subtract-dayTimeDuration-from-date which includes a very similar example.
... *** This bug has been marked as a duplicate of 2386 ***