@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/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.language, opt);
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(undefined, { numeric: "auto" });
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "1.0.454",
3
+ "version": "1.0.456",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",