i-a-n / simpler-timezones

a zero-dependency package that returns all major timezones, with tools for guessing the nearest timezone to a user
https://www.npmjs.com/package/simpler-timezones
MIT License
2 stars 0 forks source link

how about some rigor behind the `primary_locales`, bozo? #7

Open i-a-n opened 2 years ago

i-a-n commented 2 years ago

note to self: use a real, sourced metric for determining the primary_locales for each timezone, and then document that metric. some options:

  1. most populous of the "canonical" locale(s) in the official tzdb list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  2. the one or two canonical locales in each offset with the most internet users

determining the number of primary locales for each offset is something else I need to put some rigor behind. some potential criteria to use:

  1. always one locale, unless the offset spans multiple hemispheres or continents, then one from each hemisphere or continent (minus antarctica)
  2. one from each large political entity, meaured by either population or internet users, in the event two similar-sized, large political entities make up the majority of the population in each offset (e.g., baghdad and moscow)
  3. one from each large political entity, again meaured by either population or internet users, in the event there is a political conflict between the two political entities that might cause users in either entity to be unwilling or unable to select an offset only represented by a locale in the other entity.

yikes, sounds like I'm about to charter the EU or something, this sucks. timezones suck.

i-a-n commented 2 years ago

worth noting: the only reason for having primary_locales in the first place is for user clarity. reading [+0800] Pacific Time (America/Los_Angeles) generally makes most users' choice easier than if they were just reading [+0800] Pacific Time.

but if this whole thing turns into a giant can of worms, I dunno, maybe we could drop it. or, tell people "tough crackers, if you don't like a certain primary_locale just don't show it.

i-a-n commented 2 years ago

"