Returns the xs:date
that is a given duration before a specified
xs:date
(or after, if the duration is negative).
xs:date
and an
xs:yearMonthDuration
value. op:subtract-yearMonthDuration-from-date
( $arg1
as xs:date
,$arg2
as xs:yearMonthDuration
xs:date
Returns the xs:date
computed by negating $arg2
and adding the
result to $arg1
using the function
op:add-yearMonthDuration-to-date
.
The expression op:subtract-yearMonthDuration-from-date(xs:date("2000-10-30"),
xs:yearMonthDuration("P1Y2M"))
returns xs:date("1999-08-30")
.
The expression op:subtract-yearMonthDuration-from-date(xs:date("2000-02-29Z"),
xs:yearMonthDuration("P1Y"))
returns xs:date("1999-02-28Z")
.
The expression op:subtract-yearMonthDuration-from-date(xs:date("2000-10-31-05:00"),
xs:yearMonthDuration("P1Y1M"))
returns xs:date("1999-09-30-05:00")
.