xs.yearMonthDuration.divide

xs.yearMonthDuration.divide(
   value as number|xs.yearMonthDuration
) as xs.yearMonthDuration|number

Summary

Divides an xs.yearMonthDuration by an number. Returns an xs.yearMonthDuration. Or divides an xs.yearMonthDuration by an xs.yearMonthDuration. Returns an number.

Parameters
value A number or year month duration.

Example

const v1 = xs.yearMonthDuration("P3Y7M");
const v2 = xs.yearMonthDuration("P1Y4M");
v1.divide(v2);
Powered by MarkLogic Server | Terms of Use | Privacy Policy