# op:subtract-yearMonthDuration-from-date - XPath XQuery Reference

Returns the xs:date that is a given duration before a specified
               xs:date (or after, if the duration is negative).Defines the semantics
         of the "-" operator when applied to an xs:date and an
            xs:yearMonthDuration value. deterministiccontext-independentfocus-independentReturns the xs:date computed by negating $arg2 and adding the
            result to $arg1 using the function
               op:add-yearMonthDuration-to-date.op:subtract-yearMonthDuration-from-date(xs:date("2000-10-30"),
                  xs:yearMonthDuration("P1Y2M"))xs:date("1999-08-30")op:subtract-yearMonthDuration-from-date(xs:date("2000-02-29Z"),
                  xs:yearMonthDuration("P1Y"))xs:date("1999-02-28Z")op:subtract-yearMonthDuration-from-date(xs:date("2000-10-31-05:00"),
                  xs:yearMonthDuration("P1Y1M"))xs:date("1999-09-30-05:00")