Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

icu::timezone but icu::datetime::time_zone #4350

Open
robertbastian opened this issue Nov 22, 2023 · 13 comments
Open

icu::timezone but icu::datetime::time_zone #4350

robertbastian opened this issue Nov 22, 2023 · 13 comments
Labels
2.0-breaking Changes that are breaking API changes C-datetime Component: datetime, calendars, time zones S-small Size: One afternoon (small bug fix or enhancement)

Comments

@robertbastian
Copy link
Member

robertbastian commented Nov 22, 2023

Names should be consistent

@sffc
Copy link
Member

sffc commented Nov 22, 2023

We decided "Metazone" is one word but "Time Zone" is two words (#2507). This implies that it should be icu::time_zone. But, that is a crate name.

Options:

  1. Live with it
  2. Change icu_timezone to icu_time_zone and deprecate the crate icu_timezone
  3. Change icu::datetime::time_zone to icu::datetime::timezone in module names
  4. 2 + change all instances of snake case time_zone to timezone
  5. 2 + 3 + change all instances of camel case TimeZone to Timezone

@sffc sffc added discuss Discuss at a future ICU4X-SC meeting C-datetime Component: datetime, calendars, time zones labels Nov 22, 2023
@sffc
Copy link
Member

sffc commented Nov 30, 2023

Discuss with:

@sffc sffc added the discuss-triaged The stakeholders for this issue have been identified and it can be discussed out-of-band label Nov 30, 2023
@robertbastian
Copy link
Member Author

It doesn't look like we ever decided that "time zone" is two words, only that "metazone" is one. "timezone" seems to be the prevalent spelling: https://books.google.com/ngrams/graph?content=timezone%2C%22time+zone%22&year_start=1800&year_end=2000&case_insensitive=on&corpus=en-2012&smoothing=3

I vote for 4.

@sffc
Copy link
Member

sffc commented Jan 5, 2024

CC @markusicu

@robertbastian robertbastian added this to the ICU4X 2.0 milestone Feb 28, 2024
@robertbastian robertbastian added the 2.0-breaking Changes that are breaking API changes label Feb 28, 2024
@sffc
Copy link
Member

sffc commented Feb 29, 2024

I maybe prefer option 3 just because TimeZone stylized with that casing is so common. But it means camel and snake don't agree which is unfortunate.

@markusicu
Copy link
Member

No strong opinion. Not 4.

@zbraniecki
Copy link
Member

My vote is for 3. Primarily because Temporal seems to set on TimeZone.

@Manishearth
Copy link
Member

  1. Live with it (icu_timezone, icu::timezone, TimeZone)
  2. Change icu_timezone to icu_time_zone and deprecate the crate icu_timezone
  3. Change icu::datetime::time_zone to icu::datetime::timezone in module names
  4. 2 + change all instances of snake case time_zone to timezone
  5. 2 + 3 + change all instances of camel case TimeZone to Timezone

Discussion:

  • @robertbastian - I don't like option 1 because I don't want to change the crate name. We also decided that Metazone is one word so I don't know why Time zone should be two words. Also the first thing people will see is icu_timezone/icu::timezone, so using time_zone after that look inconsistent.
  • @echeran - I favor option 0 because I like the consistency of documentation. Renaming crates has a lot of churn.
  • @sffc - To clarify, icu::datetime::time_zone is a module name, not a crate name.
  • @zbraniecki - I'd like to do what the English dictionary does for "metazone" versus "time zone". This difference is reflected in Britannica, Microsoft, and Wikipedia. I suggest we follow that. I'd like us to follow JS Temporal, which capitalizes "Z".
  • @echeran - I agree with Zibi but I would leave the crate name alone. What I don't like is, across Unicode documentation, we should try to be consistent.
  • @sffc - UTS 35 is also internally inconsistent. It has <timeZoneNames> but <timezoneData> (which is "deprecated and no longer used")
  • @Manishearth - We have "icu_casemap", "icu_datetime", "icu_displaynames", ... the only one with an underscore is "icu_locid_transform", but even locid could be loc_id. So keeping timezone at the top level is what I would prefer.
  • @sffc - I like the convention of path names being single words.
  • @robertbastian - (there is "fixed_decimal" though)

Open for votes!

@markusicu
Copy link
Member

My vote: option 2 -- change the module name to be consistent with the crate, but keep time_zone variables and TimeZone types

@Manishearth
Copy link
Member

I also vote 2

2 > 3 > 0 >> 4 > 1

@robertbastian
Copy link
Member Author

2 > 3 > 4 >> 1,0

@sffc
Copy link
Member

sffc commented Mar 19, 2024

Ballots: https://docs.google.com/document/d/1cwObpQ_gdCsoZVEDNV7C-7eODxElGIJ3FNdivlbLnNo/edit

Results: Options 0, 1, and 4 have vetoes. Among 2 and 3, option 2 is much more popular. It is also the first choice of 6 of 7 ballots. Therefore, option 2 wins.

Action: find all modules in icu4x that have "time zone" in the name and make sure it is stylized as "timezone".

@sffc sffc added S-small Size: One afternoon (small bug fix or enhancement) and removed discuss Discuss at a future ICU4X-SC meeting discuss-triaged The stakeholders for this issue have been identified and it can be discussed out-of-band labels Mar 19, 2024
@sffc
Copy link
Member

sffc commented Jun 12, 2024

The winning option 2 is the following style:

  • Module and crate names: timezone (flat case)
  • Function names, type names: camel or snake case depending on language conventions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.0-breaking Changes that are breaking API changes C-datetime Component: datetime, calendars, time zones S-small Size: One afternoon (small bug fix or enhancement)
Projects
Status: Small breakage (defer to end)
Development

No branches or pull requests

6 participants