You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Let _preference_ be RegionPreference(_loc_.[[Locale]]).
634
-
1. Let _region_ be _preference_.[[Region]].
635
-
1. Let _regionOverride_ be _preference_.[[RegionOverride]].
636
-
1. If _regionOverride_ is not *undefined* and calendar preference data for _regionOverride_ are available, then
637
-
1. Let _lookupRegion_ be _regionOverride_.
638
-
1. Else,
639
-
1. Let _lookupRegion_ be _region_.
634
+
1. If _preference_.[[RegionOverride]] is not *undefined*, let _preferredRegions_ be « _preference_.[[RegionOverride]], _preference_.[[Region]] »; else let _preferredRegions_ be « _preference_.[[Region]] ».
635
+
1. Let _calendarsInUse_ be a new empty List.
636
+
1. Let _language_ be GetLocaleLanguage(_loc_.[[Locale]]).
637
+
1. For each String _region_ of _preferredRegions_, do
638
+
1. Let _locale_ be the string-concatenation of _language_, *"-"*, and _region_.
639
+
1. If _calendarsInUse_ is empty and calendar preference data for locale _locale_ are available, then
640
+
1. Set _calendarsInUse_ to a List of unique calendar types in common use for date and time formatting in locale _locale_, sorted by descending preference of use in _locale_.
641
+
1. If _calendarsInUse_ is empty and calendar preference data for region _region_ are available, then
642
+
1. Set _calendarsInUse_ to a List of unique calendar types in common use for date and time formatting in region _region_, sorted by descending preference of use in _region_.
640
643
1. Let _list_ be a new empty List.
641
644
1. Let _availableCalendars_ be AvailableCalendars().
642
-
1. Let _calendarsInUse_ be a List of unique calendar types in common use for date and time formatting in _lookupRegion_, sorted by descending preference of use in _lookupRegion_. The list is empty if no calendar preference data for _lookupRegion_ is available.
643
645
1. For each element _identifier_ of _calendarsInUse_, do
644
646
1. Let _canonical_ be CanonicalizeUValue(*"ca"*, _identifier_).
645
647
1. If _availableCalendars_ contains _canonical_ and _list_ does not contain _canonical_, then
@@ -689,15 +691,17 @@ <h1>
689
691
1. If _loc_.[[HourCycle]] is not *undefined*, then
1. Let _preference_ be RegionPreference(_loc_.[[Locale]]).
692
-
1. Let _region_ be _preference_.[[Region]].
693
-
1. Let _regionOverride_ be _preference_.[[RegionOverride]].
694
-
1. If _regionOverride_ is not *undefined* and time data for _regionOverride_ are available, then
695
-
1. Let _lookupRegion_ be _regionOverride_.
696
-
1. Else,
697
-
1. Let _lookupRegion_ be _region_.
698
-
1. Let _list_ be a List of unique hour cycle identifiers, which must be lower case String values indicating either the 12-hour format (*"h11"*, *"h12"*) or the 24-hour format (*"h23"*, *"h24"*), sorted in descending preference of those in common use for date and time formatting in _lookupRegion_. The list is empty if no time data for _lookupRegion_ is available.
699
-
1. If _list_ is empty, set _list_ to « *"h23"* ».
700
-
1. Return CreateArrayFromList(_list_).
694
+
1. If _preference_.[[RegionOverride]] is not *undefined*, let _preferredRegions_ be « _preference_.[[RegionOverride]], _preference_.[[Region]] »; else let _preferredRegions_ be « _preference_.[[Region]] ».
695
+
1. Let _hourCycles_ be a new empty List.
696
+
1. Let _language_ be GetLocaleLanguage(_loc_.[[Locale]]).
697
+
1. For each String _region_ of _preferredRegions_, do
698
+
1. Let _locale_ be the string-concatenation of _language_, *"-"*, and _region_.
699
+
1. If _hourCycles_ is empty and time data for locale _locale_ are available, then
700
+
1. Set _hourCycles_ to a List of unique hour cycle identifiers, which must be lower case Strings indicating either the 12-hour format (*"h11"*, *"h12"*) or the 24-hour format (*"h23"*, *"h24"*), sorted in descending preference of those in common use for date and time formatting in locale _locale_.
701
+
1. If _hourCycles_ is empty and time data for region _region_ are available, then
702
+
1. Set _hourCycles_ to a List of unique hour cycle identifiers, which must be lower case Strings indicating either the 12-hour format (*"h11"*, *"h12"*) or the 24-hour format (*"h23"*, *"h24"*), sorted in descending preference of those in common use for date and time formatting in region _region_.
703
+
1. If _hourCycles_ is empty, set _hourCycles_ to « *"h23"* ».
0 commit comments