Returns the ratio of two xs:yearMonthDuration values.
xs:yearMonthDuration values.op:divide-yearMonthDuration-by-yearMonthDuration( $arg1 as xs:yearMonthDuration,$arg2 as xs:yearMonthDurationxs:decimalThe function returns the result of dividing the length in months of $arg1
by the length in months of $arg2, according to the rules of the
op:numeric-divide function for integer operands.
For handling of overflow and underflow, see .
The expression op:divide-yearMonthDuration-by-yearMonthDuration(xs:yearMonthDuration("P3Y4M"),
xs:yearMonthDuration("-P1Y4M")) returns -2.5.
The following example demonstrates how to calculate the length of an
xs:yearMonthDuration value in months:
The expression op:divide-yearMonthDuration-by-yearMonthDuration(xs:yearMonthDuration("P3Y4M"),
xs:yearMonthDuration("P1M")) returns 40.
Either duration (and therefore the result) may be negative.