@brightspace-ui/intl 3.48.2 → 3.48.3
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/lib/dateTimeSkeleton.js +6 -2
- package/package.json +1 -1
package/lib/dateTimeSkeleton.js
CHANGED
|
@@ -47,7 +47,7 @@ export function formatDateTimeSkeleton(dateTime, options = {}) {
|
|
|
47
47
|
throw 'Use skeletons only if standard supported formats are inarguably insufficient. You must explicitly opt in with the `forceUnsupportedFormat` option.';
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
if (/[
|
|
50
|
+
if (/[HhKkJ]|j{2,}/.test(skeleton)) {
|
|
51
51
|
console.warn('Replacing static hour symbols: H/h/K/k/J/jj -> j');
|
|
52
52
|
skeleton = skeleton.replace(/[HhKkJj]+/g, 'j');
|
|
53
53
|
}
|
|
@@ -64,7 +64,11 @@ export function formatDateTimeSkeleton(dateTime, options = {}) {
|
|
|
64
64
|
getDateTimeFormat(locale, opts) {
|
|
65
65
|
return new Intl.DateTimeFormat(locale, {
|
|
66
66
|
...opts,
|
|
67
|
-
...{
|
|
67
|
+
...{
|
|
68
|
+
[timeZone && 'timeZone']: timeZone,
|
|
69
|
+
[timeZoneName && 'timeZoneName']: timeZoneName,
|
|
70
|
+
[hourCycle && 'hourCycle']: hourCycle
|
|
71
|
+
}
|
|
68
72
|
});
|
|
69
73
|
}
|
|
70
74
|
};
|
package/package.json
CHANGED