@bbn/bbn 1.0.454 → 1.0.456
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/date.js +2 -2
- package/package.json +1 -1
package/dist/date.js
CHANGED
|
@@ -348,7 +348,7 @@ class bbnDateTool {
|
|
|
348
348
|
if (withSeconds) {
|
|
349
349
|
opt.second = '2-digit';
|
|
350
350
|
}
|
|
351
|
-
const t = new Intl.DateTimeFormat(navigator.
|
|
351
|
+
const t = new Intl.DateTimeFormat([bbn.env.lang, ...navigator.languages], opt);
|
|
352
352
|
return t.format(__classPrivateFieldGet(this, _bbnDateTool_value, "f"));
|
|
353
353
|
}
|
|
354
354
|
format(format = 'y-m-d h:i:s') {
|
|
@@ -447,7 +447,7 @@ class bbnDateTool {
|
|
|
447
447
|
const date = new Date();
|
|
448
448
|
const chosenUnit = unitsCorrespondence[unit] || this.guessUnit(this.diff(date));
|
|
449
449
|
const diff = this.diff(date, chosenUnit);
|
|
450
|
-
const rtf = new Intl.RelativeTimeFormat(
|
|
450
|
+
const rtf = new Intl.RelativeTimeFormat([bbn.env.lang, ...navigator.languages], { numeric: "auto" });
|
|
451
451
|
// FORCED UNIT MODE
|
|
452
452
|
const match = bbn.fn.getRow(units, d => d[0] === chosenUnit);
|
|
453
453
|
if (!match) {
|