divideByDuration method

double divideByDuration(
  1. XPathDuration other
)

Divides this duration by another XPathDuration returning a double.

Implementation

double divideByDuration(XPathDuration other) {
  if (type.isSubtypeOf(xsYearMonthDuration) &&
      other.type.isSubtypeOf(xsYearMonthDuration)) {
    return totalMonths / other.totalMonths;
  }
  return totalMicroseconds / other.totalMicroseconds;
}