-
Notifications
You must be signed in to change notification settings - Fork 110
Replace js-joda
with JavaScript Temporal
#501
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
Comments
There is only a tiny piece of So, unfortunately, it's not possible for us to reimplement our functionality on top of Temporal in its current form. |
Also, it seems like you can convert a
Apologies if I'm just ignorant on this matter, but do these methods somehow offer different semantics from those expected by |
Rereading your comment (apologies), you're saying that the disambiguation policy employed by
How does this differ from the
Although it might already be too late, it would be nice to understand exactly what features Temporal lacks that In this case, you're saying that Temporal would need a new disambiguation option for it to be compatible with |
Oh, okay. This means that we probably can implement
If clocks jumped from 23:29 directly to 00:30 and we ask for 00:00,
In the current state of the library, possibly not. In the planned state of our library, we need either the direct access to the timezone database or at least something similar to https://en.cppreference.com/w/cpp/chrono/local_info |
Having researched some more, I believe now that it's possible, albeit cumbersome, to use the Temporal as our backend if we have to. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/getTimeZoneTransition is the key to that. Thanks for raising this issue! |
Uh oh!
There was an error while loading. Please reload this page.
With Temporal being a stage 3 proposal and starting to be implemented in browsers, I was wondering if the
kotlinx-datetime
team has any plans to ditchjs-joda
in favour of Temporal for the JS targets.Due to Temporal supporting timezones natively, this would have the added benefit that users would no longer need to install a separate library to handle them.
While Temporal is in the process of being shipped in browsers and other engines,
kotlinx-datetime
could encourage users to install one of the existing polyfills, knowing that at some point in the future, said polyfills would no longer be necessary.I'm opening this issue in order to track any progress in this area, if such a task is on the team's radar. Hope that's okay. 😄
The text was updated successfully, but these errors were encountered: