iamkun / dayjs

⏰ Day.js 2kB immutable date-time library alternative to Moment.js with the same modern API
https://day.js.org
MIT License
46.7k stars 2.28k forks source link

Incorrect City Spelling: "Kiev" instead of "Kyiv" #2696

Open maryklevetska opened 2 months ago

maryklevetska commented 2 months ago

Describe the bug The city name "Kiev" is used in the Day.js library, which is incorrect. The correct spelling is "Kyiv". This issue can cause confusion and is not aligned with the internationally recognized spelling.

Expected behavior The city name should be spelled "Kyiv" instead of "Kiev" to reflect the correct and internationally recognized spelling. "Kiev" is the russian spelling, while "Kyiv" is the Ukrainian spelling. Kyiv is in Ukraine, and the correct spelling in Ukrainian is "Kyiv".

Information

alexandermirzoyan commented 1 month ago

Any idea how the timezone is implemented on that website? @maryklevetska

I have made a search on the source code of dayjs and could not find any match with a word for "Kiev"

maryklevetska commented 1 month ago

@alexandermirzoyan thanks for your response. Honestly, I don't know how it works, but all I have is Maven.com's answer regarding the resource they use for timezone information (attached is a screenshot from our chat). I have paid attention to other sites for the correct spelling, and there are no problems there, so I believe this is not an issue on my end. Do you think I need to contact them again for more information? Screenshot 2024-07-22 at 11 01 03

alexandermirzoyan commented 1 month ago

@iamkun any idea?

alexandermirzoyan commented 1 month ago

Seems I found root cause of the problem - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTimeZones

In the global timezone standard city Kyiv is written as Kiev. And the value is used globally. So there is aCurrent IANA name table in the link attached where it has been changed to Kyiv but seems not all browsers had been updated on that. To be sure you can open the website you have provided with Firefox if it works we can be sure that the problem is from browsers.

maryklevetska commented 1 month ago

@alexandermirzoyan so I opened it with Firefox and the spelling is still Kiev Screenshot 2024-07-22 at 13 23 43

alexandermirzoyan commented 1 month ago

@maryklevetska thank you for your response.

So seems the problem is at timezone.js file while getting the timeZoneName.

What do you think @iamkun ?