-
-
Notifications
You must be signed in to change notification settings - Fork 631
Tracking issue for the Temporal builtin #1804
Copy link
Copy link
Labels
A-EnhancementNew feature or requestNew feature or requestC-BuiltinsPRs and Issues related to builtins/intrinsicsPRs and Issues related to builtins/intrinsics
Metadata
Metadata
Assignees
Labels
A-EnhancementNew feature or requestNew feature or requestC-BuiltinsPRs and Issues related to builtins/intrinsicsPRs and Issues related to builtins/intrinsics
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
Done
Status
Implemented
Tracking for the
Temporalbuilt-in implementationboa_temporalcrate (MigrateTemporalto its own crate. #3461)Temporal.Duration(Tracking issue for Temporal Duration object #4070)Temporal.PlainDate(Tracking issue for Temporal PlainDate object #4071)Temporal.Instant(Tracking issue for Temporal Instant object #4074)Temporal.PlainDateTime(Tracking issue for Temporal PlainDateTime object #4072)Temporal.PlainYearMonth(Tracking issue for Temporal YearMonth object #4077)Temporal.PlainMonthDay(Tracking issue for Temporal MonthDay object #4076)Temporal.PlainTimemethods and operations (Tracking issue for Temporal PlainTime object #4073)Implement(Removed from the Temporal Proposal Mid 2024)Temporal.TimeZonemethods and operationsTemporal.ZonedDateTimemethods and operations (Tracking issue for Temporal ZonedDateTime object #4075)Temporal.Now(dependent onTemporal.Instant,Temporal.DateTimeandTemporal.ZonedDateTime)ECMASCript feature
The new
TemporalAPI 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: