Skip to content

Datetime field names use different normalization than calendar #22342

Open
@TomAugspurger

Description

@TomAugspurger

At least under some conditions?

>>> import locale
>>> import calendar
>>> import unicodedata
>>> from pandas._libs.tslibs import fields
>>> locale_name = "crh_UA.UTF-8"
>>> x = fields.get_locale_names('f_month', locale_name)[6].capitalize()
>>> y = calendar.month_name[6].capitalize()

>>> x == y
# False

unicodedata.normalize("NFD", x) == unicodedata.normalize("NFD", y)
# True

this manifests in failures in #21814 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugDatetimeDatetime data dtypeNeeds DiscussionRequires discussion from core team before further actionUnicodeUnicode strings

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions