Loading TOC...

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);

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.