Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLDR-17484 Update dayPeriods.xml #4375

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions common/supplemental/dayPeriods.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
-->
<supplementalData>
<version number="$Revision$"/>
<!-- Remember to make parallel changes both dayPeriodRuleSets! -->
<dayPeriodRuleSet>
<dayPeriodRules locales="root">
<dayPeriodRule type="am" from="00:00" before="12:00"/> <!-- AM -->
Expand All @@ -15,10 +16,10 @@
<dayPeriodRules locales="en">
<dayPeriodRule type="midnight" at="00:00"/> <!-- midnight -->
<dayPeriodRule type="noon" at="12:00"/> <!-- noon -->
<dayPeriodRule type="morning1" from="06:00" before="12:00"/> <!-- morning -->
<dayPeriodRule type="morning1" from="00:00" before="12:00"/> <!-- morning -->
<dayPeriodRule type="afternoon1" from="12:00" before="18:00"/> <!-- afternoon -->
<dayPeriodRule type="evening1" from="18:00" before="21:00"/> <!-- evening -->
<dayPeriodRule type="night1" from="21:00" before="06:00"/> <!-- night -->
<dayPeriodRule type="night1" from="21:00" before="24:00"/> <!-- night -->
</dayPeriodRules>
<dayPeriodRules locales="af">
<dayPeriodRule type="midnight" at="00:00"/> <!-- middernag -->
Expand Down Expand Up @@ -693,10 +694,10 @@
<dayPeriodRule type="pm" from="12:00" before="24:00"/> <!-- PM -->
</dayPeriodRules>
<dayPeriodRules locales="en">
<dayPeriodRule type="morning1" from="06:00" before="12:00"/> <!-- morning -->
<dayPeriodRule type="morning1" from="00:00" before="12:00"/> <!-- morning -->
<dayPeriodRule type="afternoon1" from="12:00" before="18:00"/> <!-- afternoon -->
<dayPeriodRule type="evening1" from="18:00" before="21:00"/> <!-- evening -->
<dayPeriodRule type="night1" from="21:00" before="06:00"/> <!-- night -->
<dayPeriodRule type="night1" from="21:00" before="24:00"/> <!-- night -->
</dayPeriodRules>
<dayPeriodRules locales="af">
<dayPeriodRule type="morning1" from="05:00" before="12:00"/> <!-- oggend -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -865,16 +865,15 @@ public void TestCheckDates() {
Subtype.dateSymbolCollision
},

// 00-06 night1
// 06-12 morning1
// 00-12 morning1
// 12-18 afternoon1
// 18-21 evening1
// 21-24 night1
//
// So for a 12hour time, we have:
//
// 12 1 2 3 4 5 6 7 8 9 10 11
// n n n n n n m m m m m m
// m m m m m m m m m m m m
// a a a a a a e e e n n n

// Formatting has looser collision rules, because it is always paired with a time.
Expand All @@ -890,15 +889,15 @@ public void TestCheckDates() {
DayPeriod.morning1,
Subtype.dateSymbolCollision
},
{Type.format, DayPeriod.night1, Type.format, DayPeriod.afternoon1, Subtype.none},
{Type.format, DayPeriod.night1, Type.format, DayPeriod.evening1, Subtype.none},
{
Type.format,
DayPeriod.night1,
DayPeriod.morning1,
Type.format,
DayPeriod.afternoon1,
Subtype.dateSymbolCollision
},
{Type.format, DayPeriod.night1, Type.format, DayPeriod.evening1, Subtype.none},
{Type.format, DayPeriod.morning1, Type.format, DayPeriod.afternoon1, Subtype.none},
{
Type.format,
DayPeriod.morning1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1107,9 +1107,8 @@ public void TestDayPeriods() {
checkDayPeriod("pl", "format", "morning1", "〖06:00 – 10:00⁻〗〖❬8:00 ❭rano〗");
checkDayPeriod("pl", "stand-alone", "morning1", "〖06:00 – 10:00⁻〗");

checkDayPeriod(
"en", "format", "night1", "〖00:00 – 06:00⁻; 21:00 – 24:00⁻〗〖❬3:00 ❭at night〗");
checkDayPeriod("en", "stand-alone", "night1", "〖00:00 – 06:00⁻; 21:00 – 24:00⁻〗");
checkDayPeriod("en", "format", "night1", "〖21:00 – 24:00⁻〗〖❬10:30 ❭at night〗");
checkDayPeriod("en", "stand-alone", "night1", "〖21:00 – 24:00⁻〗");

checkDayPeriod("en", "format", "noon", "〖12:00〗〖❬12:00 ❭noon〗");
checkDayPeriod("en", "format", "midnight", "〖00:00〗〖❬12:00 ❭midnight〗");
Expand All @@ -1133,7 +1132,7 @@ public void TestAllDayPeriods() { // excludes midnight, see ICU-12278
checkDayPeriodsForLocale(
"en",
"Bhm",
"〖3:00 at night〗〖9:00 in the morning〗〖12:00 noon〗〖3:00 in the afternoon〗〖7:30 in the evening〗");
"〖6:00 in the morning〗〖12:00 noon〗〖3:00 in the afternoon〗〖7:30 in the evening〗〖10:30 at night〗");
checkDayPeriodsForLocale(
"it",
"Bhm",
Expand Down
Loading