kotlinx-datetime icon indicating copy to clipboard operation
kotlinx-datetime copied to clipboard

Consider a new name for `TimeZone.of`

Open dkhalanskyjb opened this issue 1 year ago • 1 comments

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 avatar Sep 18 '24 09:09 dkhalanskyjb

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?

TarunVishwakarma1 avatar Sep 26 '24 19:09 TarunVishwakarma1