mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 09:51:57 -05:00
LibUnicode: Do not set day period format length for {ampm} segments
TR-35 does define lengths for {ampm}, but they are unused by ECMA-402. To the contrary, defining the day_period length for this segment will prevent BasicFormatMatcher from ever selecting a pattern that contains this segment. Instead, ECMA-402 will only use the short length for {ampm} segments.
This commit is contained in:
parent
78252d7777
commit
80ea6e664d
1 changed files with 0 additions and 7 deletions
|
@ -368,13 +368,6 @@ static Optional<CalendarPatternIndexType> parse_date_time_pattern(String pattern
|
|||
else if (all_of(segment, is_any_of("ab"sv))) {
|
||||
builder.append("{ampm}");
|
||||
hour12 = true;
|
||||
|
||||
if (segment.length() == 4)
|
||||
format.day_period = CalendarPatternStyle::Long;
|
||||
else if (segment.length() == 5)
|
||||
format.day_period = CalendarPatternStyle::Narrow;
|
||||
else
|
||||
format.day_period = CalendarPatternStyle::Short;
|
||||
} else if (all_of(segment, is_char('B'))) {
|
||||
builder.append("{dayPeriod}");
|
||||
hour12 = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue