moment / luxon

⏱ A library for working with dates and times in JS
https://moment.github.io/luxon
MIT License
15.05k stars 730 forks source link

Day/Month spelling discrepancy in some Locales #1635

Closed abhishekpolampally closed 1 month ago

abhishekpolampally commented 1 month ago

Describe the bug There is some discrepancy in spellings, in Locales like Croatia , Czech. Luxon is using different spellings than Java.

for ex: květen vs kvetna , svibanj vs svibnja etc.

To Reproduce Use the Info.months('long', {locale: "hr_HR"})

Actual vs Expected behavior The spellings should be consistent with the standard formats of months on the web.

Additional context Luxon locale spellings seem to be different from the standard Java locale spellings.

icambron commented 1 month ago

Luxon doesn't ship these strings, or spend any energy adjudicating them. Instead, they're extracted from the ICU data that ships with the JS runtime, using the Intl API. I am willing to hear out claims that we aren't doing a good job extracting those values, but not that they are mistaken; take that up with the ICU, or possibly your browser, if you're using an old version with an old version of the ICU data.

But I also strongly suspect your examples from Luxon are correct, though I don't speak either language. There's no reason to think Java is an authority here, especially compared to the ICU. A quick Google search:

  1. květen, returned by Luxon in Chrome, is the spelling in the Czech wikipedia article about May
  2. svibanj, returned by Luxon in Chrome, appears to be the base form of May, and svibnja is the genitive form, if I'm reading this Wiktionary entry correctly