mattjohnsonpint / TimeZoneNames

Provides a complete source of localized time zone names and abbreviations.
MIT License
196 stars 32 forks source link

Fix issue with expected format of language code #104

Open bmrfvr opened 8 months ago

bmrfvr commented 8 months ago

The format of the language code is [language]-[country] but this method is trying to split it based on a format of [language]_[country]

I also updated one of the tests to have one of the failing test cases so we can ensure this doesn't break in the future.

Before: MicrosoftTeams-image (27) After: MicrosoftTeams-image (28)

mattjohnsonpint commented 8 months ago

Thanks for looking into this! I'll take a closer look to validate the change, adjust the verification tests, and merge as soon as I can find some free time.

bmrfvr commented 8 months ago

Thanks for looking into this! I'll take a closer look to validate the change, adjust the verification tests, and merge as soon as I can find some free time.

No problem!

There is a simple workaround if you more issues are created before this issue gets resolved. You can just simply do the .ToLowerInvariant().Replace('-', '_') yourself and pass that in instead of a proper language code.