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
{{ message }}
This repository has been archived by the owner on Mar 21, 2022. It is now read-only.
Currently, DayPeriodFormatter only uses a locale's language code to determine the day period string. However, some rule sets have regional variations, such as es_cO, for "Spanish (Colombia)". These should be selected for matching locales.
This should be as straightforward as changing the current implementation to make two checks, first with and then without the region code. The only real trick is matching the identifier format for case and punctuation (e.g. Locale.identifier BCP 47 es-CO -> CLDR key es_co)
Currently,
DayPeriodFormatter
only uses a locale's language code to determine the day period string. However, some rule sets have regional variations, such ases_cO
, for "Spanish (Colombia)". These should be selected for matching locales.This should be as straightforward as changing the current implementation to make two checks, first with and then without the region code. The only real trick is matching the identifier format for case and punctuation (e.g.
Locale.identifier
BCP 47es-CO
-> CLDR keyes_co
)DayPeriodFormatter/Sources/DayPeriodFormatter/DayPeriodFormatter.swift
Line 23 in 0d888bf
The text was updated successfully, but these errors were encountered: