Returns the result of adding two xs:yearMonthDuration
values.
xs:yearMonthDuration
values.op:add-yearMonthDurations
( $arg1
as xs:yearMonthDuration
,$arg2
as xs:yearMonthDuration
xs:yearMonthDuration
The function returns the result of adding the value of $arg1
to the value
of $arg2
. The result will be an xs:yearMonthDuration
whose
length in months is equal to the length in months of $arg1
plus the length
in months of $arg2
.
For handling of overflow, see .
The expression op:add-yearMonthDurations(xs:yearMonthDuration("P2Y11M"),
xs:yearMonthDuration("P3Y3M"))
returns xs:yearMonthDuration("P6Y2M")
.
Either duration (and therefore the result) may be negative.