-
Notifications
You must be signed in to change notification settings - Fork 730
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
Discrepancy on timestamp formatting when it comes to languages and countries / locale #1607
Comments
Check the underlying platform by using
When formatting, it is as described above. Hope this helps! |
Describe the bug
In Luxon timestamp formatting, we have the ability to provide the locale like the following:
en-US
will be English language and US as the countryes-ES
will be Spanish language and Spain as the countryes-US
will be Spanish language and US as the countryNow, given we have the timestamp
2024-03-05T14:09:47Z
, and when we applied the respective locales, below is the current outputen-US
will be3/5/2024, 2:09:42 PM UTC
es-ES
will be5/3/2024, 14:06:32 UTC
es-US
will be5/3/2024, 2:09:47 p. m. UTC
The issue lies with
es-US
. We know the language should beSpanish, so all language should be translated in Spanish format.. But the country is set to
US. This means it should follow the
mm/dd/yyyy` format right?I'm expecting
es-US
will be the following output:To Reproduce
Please share a minimal code example that triggers the problem:
Actual vs Expected behavior
A clear and concise description of what you expected to happen.
Given in the locale, the country is set to US i.e.
en-US
,es-US
, then the date time format should bemm/dd/yyyy
instead of using the language set in the locale.Moreover I want to understand what the
language-Country
combination plays in luxon when interpreting timestamps?Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: