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

Tracking issue for the Temporal builtin #1804

Open
3 of 12 tasks
Razican opened this issue Jan 29, 2022 · 3 comments
Open
3 of 12 tasks

Tracking issue for the Temporal builtin #1804

Razican opened this issue Jan 29, 2022 · 3 comments
Assignees
Labels
builtins PRs and Issues related to builtins/intrinsics enhancement New feature or request

Comments

@Razican
Copy link
Member

Razican commented Jan 29, 2022

Tracking for the Temporal built-in implementation

ECMASCript feature
The new Temporal API has been introduced to improve date handling in JavaScript, and we should add it to Boa to be up to date with the current ECMAScript standard. Tests have been added to the official ECMAScript Test Suite (test262), so we need to pass these tests to get full coverage.

The current proposal (Stage 3) specification can be found here: https://tc39.es/proposal-temporal/

In order to implement this new proposal, you can follow the example of other builtin objects, and feel free to ask for help: https://github.com/boa-dev/boa/tree/main/boa/src/builtins

Example code

This code should now work and give the expected result:

// exact time since the Unix epoch on 1 Janary, 1970 UTC
Temporal.now.instant();
Temporal.now.instant().epochSeconds;
Temporal.now.instant().epochMilliseconds;

// current time zone
Temporal.now.timeZone();

// time in current location, e.g.
// 2021-09-18T04:17:48.435068431-04:00[America/New_York]
Temporal.now.zonedDateTimeISO();

// time in another time zone, e.g.
// 2021-09-18T09:17:48.438068435+01:00[Europe/London]
Temporal.now.zonedDateTimeISO('Europe/London');
@Razican Razican added enhancement New feature or request builtins PRs and Issues related to builtins/intrinsics labels Jan 29, 2022
@jasonwilliams
Copy link
Member

#1180 Is related to this

@lupd
Copy link
Contributor

lupd commented Apr 15, 2022

I'd like to attempt to implement this.

@jasonwilliams
Copy link
Member

Great. I’ve assigned you @lupd

@lupd lupd removed their assignment May 17, 2022
@Razican Razican self-assigned this Sep 26, 2022
@jedel1043 jedel1043 moved this to To do in Boa pre-v1 Nov 8, 2022
@jedel1043 jedel1043 changed the title Implement the Temporal API Tracking issue for the Temporal builtin Oct 12, 2023
@jedel1043 jedel1043 moved this from To do to In Progress in Boa pre-v1 Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builtins PRs and Issues related to builtins/intrinsics enhancement New feature or request
Projects
Status: In Progress
Development

No branches or pull requests

5 participants