xs.yearMonthDuration.divide( value as number|xs.yearMonthDuration ) as xs.yearMonthDuration|number
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. |
const v1 = xs.yearMonthDuration("P3Y7M"); const v2 = xs.yearMonthDuration("P1Y4M"); v1.divide(v2);