vvo / tzdb

🕰 Simplified, grouped and always up to date list of time zones, with major cities
MIT License
776 stars 54 forks source link

Add 'names' filter to getTimeZones #205

Open AndreyLinetsky opened 3 years ago

AndreyLinetsky commented 3 years ago

Hi, is it possible to add filter option to getTimeZones function? This way we can avoid pulling whole list.

Thanks

vvo commented 3 years ago

@AndreyLinetsky can you filter on your side? I am not sure to understand why you would want for the API of tzdb to do that by default.

Thanks!

AndreyLinetsky commented 3 years ago

@vvo first of all thanks for your response.

I am already filtering on my side but it happens only after getTimeZones function runs on 300+ timezones and then sorts them.

I thought it will be faster not to perform any operations + sorting on the irrelevant timezones.