shared/js/moz_intl.js
/*
 * This helper function is used by DurationFormat
 */
This helper function is used by DurationFormat
This helper function is used by DurationFormat
function splitIntoTimeUnits(v, maxUnitIdx, minUnitIdx) {
  const units = {};
  var input = Math.abs(v);
  for (var i = maxUnitIdx; i <= minUnitIdx; i++) {
    const key = durationFormatOrder[i];
    const {value} = durationFormatElements[key];
    units[key] = i == minUnitIdx ?
      Math.round(input / value) :
      Math.floor(input / value);
    input -= units[key] * value;
  }
  return units;
}
function splitIntoTimeUnits ( v , maxUnitIdx , minUnitIdx ) { const units = { } ; var input = Math . abs ( v ) ; for ( var i = maxUnitIdx ; i <= minUnitIdx ; i ++ ) { const key = durationFormatOrder [ i ] ; const { value } = durationFormatElements [ key ] ; units [ key ] = i == minUnitIdx ? Math . round ( input / value ) : Math . floor ( input / value ) ; input -= units [ key ] * value ; } return units ; }
This helper function is used by DurationFormat
This helper function is used by DurationFormat