@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/index.js
CHANGED
|
@@ -308,7 +308,7 @@ function PartitionDurationFormatPattern(df, duration) {
|
|
|
308
308
|
const dataLocaleData = DurationFormat.localeData[dataLocale];
|
|
309
309
|
if (!dataLocaleData) throw new TypeError("Invalid locale");
|
|
310
310
|
const numberingSystem = internalSlots.numberingSystem;
|
|
311
|
-
const separator = dataLocaleData.digitalFormat[numberingSystem];
|
|
311
|
+
const separator = dataLocaleData.digitalFormat[numberingSystem] ?? dataLocaleData.digitalFormat.default;
|
|
312
312
|
for (let i = 0; i < TABLE_2.length && !done; i++) {
|
|
313
313
|
const row = TABLE_2[i];
|
|
314
314
|
let value = new BigDecimal(duration[row.valueField]);
|
|
@@ -1693,13 +1693,14 @@ var DurationFormat = class DurationFormat {
|
|
|
1693
1693
|
static {
|
|
1694
1694
|
this.localeData = Object.keys(TIME_SEPARATORS.localeData).reduce((all, locale) => {
|
|
1695
1695
|
DurationFormat.availableLocales.add(locale);
|
|
1696
|
-
const nu = TIME_SEPARATORS.localeData[locale].nu;
|
|
1696
|
+
const nu = [...TIME_SEPARATORS.localeData[locale].nu];
|
|
1697
|
+
if (!nu.includes("latn")) nu.push("latn");
|
|
1697
1698
|
all[locale] = {
|
|
1698
1699
|
nu,
|
|
1699
|
-
digitalFormat:
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
}
|
|
1700
|
+
digitalFormat: {
|
|
1701
|
+
default: TIME_SEPARATORS.default,
|
|
1702
|
+
...TIME_SEPARATORS.localeData[locale].separator
|
|
1703
|
+
}
|
|
1703
1704
|
};
|
|
1704
1705
|
return all;
|
|
1705
1706
|
}, {});
|