manuelmhtr / countries-and-timezones

Minimalistic library to work with countries and timezones data
MIT License
224 stars 67 forks source link

deprecating timezones #42

Closed iwpnd closed 2 years ago

iwpnd commented 2 years ago

Hi 👋

what's your take on deprecating timezones in this library?

While I see you have removed some deprecated ones with v3.0.0, I can also see that some still remain even though they're deprecated (Poland, America/Grenada and many more). The latter are almost exclusively linked to the current canonical correct name. What is your source of truth here?

manuelmhtr commented 2 years ago

Hi @iwpnd! My main source is IANA news, then Paul Eggert's database and finally adding aliases using moment data.

I think the problem is moment, I guess it adds a lot of aliases for backward compatibility. In your experience, is there any other source I should consider? Any suggestion is very welcome.

iwpnd commented 2 years ago

Hey, the latter seems to be the root cause for deprecated time zones in your collection. moment-timezone is still on IANA 2021a, while 2021b was released in September '21. I always resort to wikipedia to be honest. This tz database maintained over there is on point and even lists what's canonical and what's deprecated.

manuelmhtr commented 2 years ago

Sounds good. I'll work this week to update the data.

iwpnd commented 2 years ago

Thank you 🙏

iwpnd commented 2 years ago

smol bump. would be great if you'd find the time @manuelmhtr. Also happy to help if you were to point me into the right direction. :)

manuelmhtr commented 2 years ago

Hi @iwpnd, thanks. I'm almost done. I updated the data with 2021c IANA database and included all deprecated timezones (some users might find them useful as well) BUT they won't be returned by the current API by default, I'll add a deprecated option to return them when required. I hope to release this version by Sunday 🤞

manuelmhtr commented 2 years ago

Hi @iwpnd, it's done!! Version 3.3.0 matches Wikipedia, it resulted to be really accurate and better organized than the other sources.

Also, added the deprecated option but by default you won't notice any deprecated timezone.

Feedback is welcome 👍