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

LibJS: Some prepatory commits to begin anew with Temporal #2387

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

trflynn89
Copy link
Contributor

These commits are to prepare us to get caught back up with the Temporal spec. My plan is to basically remove our current Temporal implementation and begin anew. I've tried a few times to make updates in place, but everything in Temporal is so intertwined that I've become convinced that is a non-starter.

So the commits here fall into one of two categories:

  1. Stop using Temporal facilities that have been removed (e.g. parsing UTC offset strings)
  2. Stop using Temporal facilities where we can achieve the same behavior without Temporal (e.g. when we only need millisecond resolution, and not nanoseconds from Temporal).

No test262 diff here.

@trflynn89 trflynn89 force-pushed the temporal_prep branch 2 times, most recently from 13cf01c to 2427cb3 Compare November 16, 2024 22:49
The Duration record no longer exists in Temporal. Implement it according
to the DurationFormat spec to prepare for its removal from our Temporal
implementation.

We also implement the DurationSign AO here as well, as the Temporal
implementation will now require a Temporal.Duration JS object.
The production for these strings has been removed from Temporal. This
implements a separate parser in accordance with the Date spec.
Stop relying on Temporal, at least temporarily. The classes used here
will soon be removed (until they are implemented again from scratch).
The Temporal.TimeZone object no longer exists in the Temporal spec.
We don't need nanosecond precision here anyways, as we only display
millisecond resolution.

This uses our simple duration formatter from AK, which is updated to
accept a Duration here. This method did not have any users after the
move from Serenity.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant