-
Notifications
You must be signed in to change notification settings - Fork 183
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
"zone" vs "time zone" #5999
Comments
Time type and subtypes at
Time zones things in a
Time zone info models also in
IANA conversions in
Windows conversions in
|
Also the field |
Now that we have thin DateTime, we should also change |
I think Not sure about If we put the time zone fields like All the rest of the names in the table are LGTM. |
|
|
@Manishearth @zbraniecki Feedback? |
I don't like
As far as Zone vs TimeZone, I don't feel like it's a problem we must solve, but it's a problem we could solve
Strongly in favor, I think the reason behind these names (consistency with IsoYear / etc) is not relevant anymore)
In favor of the changes here, but unsure on renaming IxdtfParser. It might be nice to be specific about what format it parses. OTOH people mostly haven't heard of ixdtf.
I like this, and I like Zone -> Utc where it matters.
I don't love four levels of modules but it's not that big a deal for these less common types. Otherwise like the naming here |
FWIW, I'd agree that Both |
Sounds like people are okay with icu_temporal. I am, too, though I should flag @justingrant who may worry that this would further the confusion about icu_temporal::DateTime looking like it is some official DateTime for the Rust ecosystem when it is only a thin interface for formatting. |
I'm not OK with |
I'm somewhat opposed to My favorite is still So, sounds like we're headed toward a bikeshed ballot. Any more to add to the list?
Here are some from Gemini. Any we want to promote?
I kind-of like |
I am also fine with I don't think any of those other names are good: I think clever names work well for utils crates but in the Tbh I'm not sure we need a vote, I don't see how this issue became an issue for discussing the crate name. It's unclear to me if anyone has provided a reason for disliking But my vote is |
The first line of @robertbastian's proposal in comment#2 is the new crate name. I think it's the most important and probably most controversial proposal in that post.
This is the crux. Is it the crate for "dealing with" the name? Maybe so. I think "processing" might be a better term. icu_calendar processes calendars, producing dates. icu_datetime processes dates, producing strings. icu_clock would process clocks, producing times.
I don't see these as "clever" names. Some of them, sure. But there is nothing clever about "temporal" or "clock" or "chronos" referring to a crate dealing with times.
Because the crate does more than time zones now? It's weird to import |
I think "chrono" and "chronos" are fancy names, the average developer will not know that it means timey-things. |
My choice of language there was vague. Regardless of whether it is for dealing with or processing or whatever, putting a fancy name there makes it sound like "the ICU crate for verbing with FancyName", which makes it sound like an external project.But there is nothing clever about "temporal" or "clock" or "chronos" referring to a crate dealing with times.
I'm not convinced by this. Firstly, the usage of clock doesn't match what I think of as a clock in this context. A timestamp is not a clock, a clock is something that changes, and this crate does not interoperate with system time APIs. We do not have a Secondly, this falls down for crates like segmenter, casemapper, etc. We have a variety of naming conventions here from different constraints, I don't think we are beholden to backsolving a justification for the datetime constraint and applying it here.
Okay, whatever, some of them are not "clever", but they still sound like library names to me: they're using a word that is a bit removed from the usual vocabulary and not shared with any of the types it contains. The only one that doesn't have this property, to me, is "clock", which has a different problem. General rule of thumb: if the component crate is called |
Okay, this is the first time this argument has been put forth here. I'm not super swayed by it, the type can be reexported if we want. I think we've ended up with a crate split that's got some issues but is also the best we can do, and it's fine if the name doesn't cover everything the crate does. DateTime is a simple wrapper type, it isn't the focus of the crate, I'm okay with it living wherever and having appropriate signposting/reexports. This crate is still very much a timezones crate. Also, never actually responded to this:
I still think |
I'll push back on this. It "verbs" calendars in many other ways. And when (not if) we add calendar display names, they should probably go in icu_calendar. My ranking is roughly: Another idea: |
That's not pushback, that's in concordance with my opinion: this crate primarily "verbs" times/timezones, even though it doesn't format them. I mentioned formatting as a response to the idea that
|
observation: our rankings are incompatible with the vetos |
I have no opinion about most of these renames because I don't have enough context, but here's feedback on a few of them:
Although we may wish it were otherwise, the vast majority of computing platforms consider time zone IDs to be IANA names. So most developers will at first expect an API called If an API exposes a non-IANA ID format then I think it'd be helpful to clarify this fact in the API name. So I'd suggest leaving this API name as-is for clarity, or using some other qualifier like
If a format-specific name is retained, then I also don't mind
Is this library only focused on timezones? If not then I'd avoid Unless this is the Rust port of the JS Temporal API, I'd also vote against Also, honestly, most people who've given feedback about the name "Temporal" in JS don't like the name. It was chosen to avoid confusion with the existing re: I think TL;DR - If |
That's part of the disagreement here, potentially. Here are the current docs: https://unicode-org.github.io/icu4x/rustdoc/icu_timezone/index.html All of the complex types are timezone related. However it also contains a simple (My opinion is that it's fine for |
I got linked here by @Manishearth and invited to offer an opinion. While I've perused the With respect to the crate name, I think if I saw Otherwise, I don't think I have enough context to levy an opinion. Mostly just going by the docs linked, the first line says that it's about time zones. But that makes me confused when I see types like I would also agree with @justingrant that if I see "time zone ID," then I'm probably going to assume that's an IANA time zone id. I don't think any other identifier has a lot of mindshare. One other thing I'd point out is a potential incongruity with how |
Some background here: I generally feel that the decision to do so was done more out of expediency rather than some vision of what the |
Anyway, thanks for the feedback. Yeah there's a lot of context here that's tricky to get across but the perspective of someone from the outside is super useful! |
Maybe |
My expectation of a type named However, given that |
If I call If it's named Also, if a time zone instance uses |
There doesn't necessarily need to be an
|
This sounds like a good idea. More discoverable. |
In #5610, we have a few definitions floating around for "time zone." ICU4X uses the definition based on CLDR, which defines BCP-47, which is derived from TZDB So, maybe instead of |
I don't think this is a useful litmus test: ICU4X's data-driven design means that most types with data from the user will have limited functionality, with most interesting functionality being on types wrapping ICU4X data. This is a choice driven by the language of implementation and API design. But I think calling it ID is fine as well. |
Decided to write down some facts to base the discussion off of:
|
We're not very consistent with when we use "zone" and when we spell out "time zone".
For types, we have
TimeZoneBcp47Id
,TimeZoneInfo
,TimeZoneModel
, butZoneVariant
,ZoneOffsets
, andZoneOffsetCalculator
.For methods, datetime uses
.with_zone_{location,offset,...}
, but alsoload_time_zone_{essentials, locations,...}
.ZonedDateTime
has a fieldzone: TimeZoneInfo
, but the we usetime_zone: TimeZoneInfo
on FFI.The text was updated successfully, but these errors were encountered: