@bbn/bbn 2.0.185 → 2.0.186
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bbn.js +1 -1
- package/dist/bbn.js.map +1 -1
- package/dist/dt/classes/dt.js +2 -1
- package/package.json +1 -1
package/dist/dt/classes/dt.js
CHANGED
|
@@ -959,7 +959,8 @@ export class bbnDt {
|
|
|
959
959
|
throw new Error('Invalid unit for diff: ' + unit);
|
|
960
960
|
}
|
|
961
961
|
const [, , ms] = match; // [shortUnit, rtfUnit, ms]
|
|
962
|
-
|
|
962
|
+
const result = diff / ms;
|
|
963
|
+
return result < 0 ? Math.ceil(result) : Math.floor(result);
|
|
963
964
|
}
|
|
964
965
|
guessUnit(valueInMs) {
|
|
965
966
|
const absDiff = Math.abs(valueInMs);
|