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

Consider a new name for TimeZone.of #435

Open
dkhalanskyjb opened this issue Sep 18, 2024 · 1 comment
Open

Consider a new name for TimeZone.of #435

dkhalanskyjb opened this issue Sep 18, 2024 · 1 comment
Labels
timezone The model and API of timezones
Milestone

Comments

@dkhalanskyjb
Copy link
Collaborator

It doesn't seem idiomatic. of is just visual noise that doesn't tell anything about what argument to expect. It's unclear right now what it should be called instead: it's a bit too effectful for a constructor function (as it queries the timezone database), it's far from a pure computation.

@dkhalanskyjb dkhalanskyjb added the timezone The model and API of timezones label Sep 18, 2024
@dkhalanskyjb dkhalanskyjb added this to the 0.7.0 milestone Sep 18, 2024
@TarunVishwakarma1
Copy link

TimeZone.get or TimeZone.fromId can be good new names

Confirmation - does the file changes required in kotlinx-datetime/core/common/src/TimeZone.kt are there any more files?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
timezone The model and API of timezones
Projects
None yet
Development

No branches or pull requests

2 participants