Skip to content
This repository was archived by the owner on Mar 21, 2022. It is now read-only.
This repository was archived by the owner on Mar 21, 2022. It is now read-only.

Regional Variants Aren't Being Used #2

@mattt

Description

@mattt

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)

let ruleSet = DayPeriodFormatter.ruleSetsByLanguageCode[languageCode],

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions