@formatjs/intl-durationformat 0.10.14 → 0.10.15
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/index.js +7 -6
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/polyfill-force.js +7 -6
- package/polyfill-force.js.map +1 -1
- package/polyfill.js +7 -6
- package/polyfill.js.map +1 -1
package/polyfill.js
CHANGED
|
@@ -325,7 +325,7 @@ function PartitionDurationFormatPattern(df, duration) {
|
|
|
325
325
|
const dataLocaleData = DurationFormat.localeData[dataLocale];
|
|
326
326
|
if (!dataLocaleData) throw new TypeError("Invalid locale");
|
|
327
327
|
const numberingSystem = internalSlots.numberingSystem;
|
|
328
|
-
const separator = dataLocaleData.digitalFormat[numberingSystem];
|
|
328
|
+
const separator = dataLocaleData.digitalFormat[numberingSystem] ?? dataLocaleData.digitalFormat.default;
|
|
329
329
|
for (let i = 0; i < TABLE_2.length && !done; i++) {
|
|
330
330
|
const row = TABLE_2[i];
|
|
331
331
|
let value = new BigDecimal(duration[row.valueField]);
|
|
@@ -1710,13 +1710,14 @@ var DurationFormat = class DurationFormat {
|
|
|
1710
1710
|
static {
|
|
1711
1711
|
this.localeData = Object.keys(TIME_SEPARATORS.localeData).reduce((all, locale) => {
|
|
1712
1712
|
DurationFormat.availableLocales.add(locale);
|
|
1713
|
-
const nu = TIME_SEPARATORS.localeData[locale].nu;
|
|
1713
|
+
const nu = [...TIME_SEPARATORS.localeData[locale].nu];
|
|
1714
|
+
if (!nu.includes("latn")) nu.push("latn");
|
|
1714
1715
|
all[locale] = {
|
|
1715
1716
|
nu,
|
|
1716
|
-
digitalFormat:
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
}
|
|
1717
|
+
digitalFormat: {
|
|
1718
|
+
default: TIME_SEPARATORS.default,
|
|
1719
|
+
...TIME_SEPARATORS.localeData[locale].separator
|
|
1720
|
+
}
|
|
1720
1721
|
};
|
|
1721
1722
|
return all;
|
|
1722
1723
|
}, {});
|