mattjohnsonpint / TimeZoneNames

Provides a complete source of localized time zone names and abbreviations.
MIT License
196 stars 32 forks source link

Add a new method to get country and city name for a given IANA time zone identifier #46

Open tomkludy opened 5 years ago

tomkludy commented 5 years ago

I have a need to accept IANA time zones as both input and output within my application. It is not practical for me to change the interfaces to accept country and time zone independently. Moreover, on output, I have a time zone identifier but can't disambiguate it (I.e. if I have "America/Tijuana" or "America/Los_Angeles" I have to show the user more than just "Pacific Time").

I added a new method, GetLocationNamesForTimeZone, which takes as input the IANA time zone ID, and outputs the list of countries and the "representative" city for the time zone. Also added readme documentation and tests to show how it works.

mattjohnsonpint commented 3 years ago

Noticing this is still pending. I'll do a more detailed review on this one and other enhancement requests soon. Thanks for your contributions!

mattjohnsonpint commented 1 year ago

Sorry I never got back to this.

I recently made several major changes and finally pushed 6.0.0. This PR will need to be rebased or re-worked on top of that. LMK if you are up for that still, or if not then I'll do it at some future point. Thanks again.