Source code
Revision control
Copy as Markdown
Other Tools
# Add <appendItem> entries for "DayPeriod" and "FractionalSeconds" to avoid the
# "├ ┤" parentheses from ICU and instead use the normal "( )" parentheses.
#
diff --git a/intl/icu/source/data/locales/root.txt b/intl/icu/source/data/locales/root.txt
--- a/intl/icu/source/data/locales/root.txt
+++ b/intl/icu/source/data/locales/root.txt
@@ -1283,17 +1283,19 @@ root{
}
NoonMarker:alias{"/LOCALE/calendar/gregorian/NoonMarker"}
NoonMarkerNarrow:alias{"/LOCALE/calendar/gregorian/NoonMarkerNarrow"}
appendItems{
Day{"{0} ({2}: {1})"}
+ DayPeriod{"{0} ({2}: {1})"}
Day-Of-Week{"{0} {1}"}
Era{"{1} {0}"}
Hour{"{0} ({2}: {1})"}
Minute{"{0} ({2}: {1})"}
Month{"{0} ({2}: {1})"}
Quarter{"{0} ({2}: {1})"}
Second{"{0} ({2}: {1})"}
+ FractionalSecond{"{0} ({2}: {1})"}
Timezone{"{0} {1}"}
Week{"{0} ({2}: {1})"}
Year{"{1} {0}"}
}
availableFormats{
@@ -1833,17 +1835,19 @@ root{
}
NoonMarker:alias{"/LOCALE/calendar/gregorian/NoonMarker"}
NoonMarkerNarrow:alias{"/LOCALE/calendar/gregorian/NoonMarkerNarrow"}
appendItems{
Day{"{0} ({2}: {1})"}
+ DayPeriod{"{0} ({2}: {1})"}
Day-Of-Week{"{0} {1}"}
Era{"{1} {0}"}
Hour{"{0} ({2}: {1})"}
Minute{"{0} ({2}: {1})"}
Month{"{0} ({2}: {1})"}
Quarter{"{0} ({2}: {1})"}
Second{"{0} ({2}: {1})"}
+ FractionalSecond{"{0} ({2}: {1})"}
Timezone{"{0} {1}"}
Week{"{0} ({2}: {1})"}
Year{"{1} {0}"}
}
availableFormats{
@@ -2113,17 +2117,19 @@ root{
"yMMMd",
"yMMdd",
}
appendItems{
Day{"{0} ({2}: {1})"}
+ DayPeriod{"{0} ({2}: {1})"}
Day-Of-Week{"{0} {1}"}
Era{"{1} {0}"}
Hour{"{0} ({2}: {1})"}
Minute{"{0} ({2}: {1})"}
Month{"{0} ({2}: {1})"}
Quarter{"{0} ({2}: {1})"}
Second{"{0} ({2}: {1})"}
+ FractionalSecond{"{0} ({2}: {1})"}
Timezone{"{0} {1}"}
Week{"{0} ({2}: {1})"}
Year{"{1} {0}"}
}
availableFormats{
@@ -2694,17 +2700,19 @@ root{
}
NoonMarker:alias{"/LOCALE/calendar/gregorian/NoonMarker"}
NoonMarkerNarrow:alias{"/LOCALE/calendar/gregorian/NoonMarkerNarrow"}
appendItems{
Day{"{0} ({2}: {1})"}
+ DayPeriod{"{0} ({2}: {1})"}
Day-Of-Week{"{0} {1}"}
Era{"{1} {0}"}
Hour{"{0} ({2}: {1})"}
Minute{"{0} ({2}: {1})"}
Month{"{0} ({2}: {1})"}
Quarter{"{0} ({2}: {1})"}
Second{"{0} ({2}: {1})"}
+ FractionalSecond{"{0} ({2}: {1})"}
Timezone{"{0} {1}"}
Week{"{0} ({2}: {1})"}
Year{"{1} {0}"}
}
availableFormats{
diff --git a/intl/icu/source/i18n/dtptngen.cpp b/intl/icu/source/i18n/dtptngen.cpp
--- a/intl/icu/source/i18n/dtptngen.cpp
+++ b/intl/icu/source/i18n/dtptngen.cpp
@@ -259,12 +259,12 @@ static const dtTypeElem dtTypes[] = {
{0, UDATPG_FIELD_COUNT, 0, 0, 0} , // last row of dtTypes[]
};
static const char* const CLDR_FIELD_APPEND[] = {
"Era", "Year", "Quarter", "Month", "Week", "*", "Day-Of-Week",
- "*", "*", "Day", "*", // The UDATPG_x_FIELD constants and these fields have a different order than in ICU4J
- "Hour", "Minute", "Second", "*", "Timezone"
+ "*", "*", "Day", "DayPeriod", // The UDATPG_x_FIELD constants and these fields have a different order than in ICU4J
+ "Hour", "Minute", "Second", "FractionalSecond", "Timezone"
};
static const char* const CLDR_FIELD_NAME[UDATPG_FIELD_COUNT] = {
"era", "year", "quarter", "month", "week", "weekOfMonth", "weekday",
"dayOfYear", "weekdayOfMonth", "day", "dayperiod", // The UDATPG_x_FIELD constants and these fields have a different order than in ICU4J