Skip to content

Add en-US locale #1222

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Add en-US locale #1222

wants to merge 5 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Feb 28, 2024

The code for English (United States) 'en-US'. The prefix, 'en', is a language code following the ISO 639-1 standard. The suffix, 'US', is a country code following the ISO 3166-1 Alpha-2 standard.
E.g. Discord uses that locale name for language English, US

soksanichenko and others added 4 commits February 28, 2024 15:20
The code for English (United States) 'en-US'. The prefix, 'en', is a language code following the ISO 639-1 standard. The suffix, 'US', is a country code following the ISO 3166-1 Alpha-2 standard.
@Gallaecio
Copy link
Member

Could you elaborate on why you are proposing this change? I think dateparser already uses “en-US” by default if you don’t specify a different country.

@soksanichenko
Copy link

soksanichenko commented May 22, 2025

Hello @Gallaecio
That's my PR, I really forgot about that.
I remember dataparser doesn't work properly if I use something like this

options = {'locales': ['en-US']}
dataparser.parse('12:00', **options

I will get error ValueError: Unknown locale(s): 'en-US'

@Gallaecio
Copy link
Member

But why would you set that locale? Does en not work as expected?

@soksanichenko
Copy link

soksanichenko commented May 23, 2025

That's just an example.
In my code I pass a locale as variable and don't know what's exactly locale it can be. Because of it I referred to Discord in the start post.
I mean it's legit locale and I think the dateparser should process it as rest others

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants