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

Add PlainDateTime.prototype.round implementation from temporal_rs #4164

Merged
merged 8 commits into from
Feb 19, 2025

Conversation

nekevss
Copy link
Member

@nekevss nekevss commented Feb 18, 2025

This Pull Request fixes/closes #1804 and #4072.

It changes the following:

  • Adds the PlainDateTime::round implementation from temporal_rs
  • Bumps temporal_rs and related adjustments for time zone parsing

Copy link

github-actions bot commented Feb 18, 2025

Test262 conformance changes

Test result main count PR count difference
Total 50,254 50,254 0
Passed 46,211 46,261 +50
Ignored 1,634 1,634 0
Failed 2,409 2,359 -50
Panics 0 0 0
Conformance 91.95% 92.05% +0.10%
Fixed tests (52):
test/intl402/Temporal/Now/zonedDateTimeISO/timezone-string-datetime.js (previously Failed)
test/intl402/Temporal/ZonedDateTime/from/argument-propertybag-timezone-string-datetime.js (previously Failed)
test/intl402/Temporal/ZonedDateTime/prototype/until/argument-propertybag-timezone-string-datetime.js (previously Failed)
test/intl402/Temporal/ZonedDateTime/prototype/since/argument-propertybag-timezone-string-datetime.js (previously Failed)
test/intl402/Temporal/ZonedDateTime/prototype/equals/argument-propertybag-timezone-string-datetime.js (previously Failed)
test/intl402/Temporal/ZonedDateTime/compare/argument-propertybag-timezone-string-datetime.js (previously Failed)
test/intl402/Temporal/Instant/prototype/toString/timezone-string-datetime.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/round/roundingmode-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/round/balance.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/round/roundingmode-halfexpand-is-default.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/round/roundingmode-halfCeil.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/round/roundingincrement-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/round/roundingmode-halfExpand.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/round/roundingmode-halfFloor.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/round/smallestunit-string-shorthand.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/round/roundingincrement-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/round/smallestunit-plurals-accepted.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/round/roundingmode-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/round/rounding-direction.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/round/roundingmode-trunc.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/round/smallestunit-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/round/roundingincrement-divides.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/round/subclassing-ignored.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/round/roundingmode-basic.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/round/roundingmode-ceil.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/round/roundingmode-expand.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/round/roundingmode-halfTrunc.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/round/roundingincrement-non-integer.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/round/roundingincrement-one-day.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/round/roundingmode-floor.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/round/roundingmode-halfEven.js (previously Failed)
test/built-ins/Temporal/Now/plainDateTimeISO/timezone-string-leap-second.js (previously Failed)
test/built-ins/Temporal/Now/plainDateISO/timezone-string-leap-second.js (previously Failed)
test/built-ins/Temporal/Now/zonedDateTimeISO/timezone-string-multiple-offsets.js (previously Failed)
test/built-ins/Temporal/Now/zonedDateTimeISO/timezone-string-leap-second.js (previously Failed)
test/built-ins/Temporal/Now/plainTimeISO/timezone-string-leap-second.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/from/argument-propertybag-timezone-string-multiple-offsets.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/from/argument-propertybag-timezone-string-leap-second.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/prototype/until/argument-propertybag-timezone-string-multiple-offsets.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/prototype/until/argument-propertybag-timezone-string-leap-second.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/prototype/withTimeZone/timezone-string-multiple-offsets.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/prototype/withTimeZone/timezone-string-leap-second.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/prototype/since/argument-propertybag-timezone-string-multiple-offsets.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/prototype/since/argument-propertybag-timezone-string-leap-second.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/prototype/equals/argument-valid.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/prototype/equals/argument-propertybag-timezone-string-multiple-offsets.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/prototype/equals/argument-propertybag-timezone-string-leap-second.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/compare/argument-propertybag-timezone-string-multiple-offsets.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/compare/argument-propertybag-timezone-string-leap-second.js (previously Failed)
test/built-ins/Temporal/Instant/prototype/toString/timezone-string-multiple-offsets.js (previously Failed)
test/built-ins/Temporal/Instant/prototype/toString/timezone-string-leap-second.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/round/relativeto-propertybag-timezone-string-leap-second.js (previously Failed)
Broken tests (2):
test/built-ins/Temporal/PlainDateTime/prototype/round/throws-argument-object-insufficient-data.js (previously Passed)
test/built-ins/Temporal/PlainDateTime/prototype/round/throws-argument-object.js (previously Passed)

@nekevss
Copy link
Member Author

nekevss commented Feb 18, 2025

The two broken tests for round are fixed by the linked PR.

This also requires manually validating against the TimeZoneProvider. Hopefully this could be improved upon in temporal_rs.

@nekevss nekevss requested a review from a team February 18, 2025 05:07
@nekevss nekevss added the builtins PRs and Issues related to builtins/intrinsics label Feb 18, 2025
@nekevss nekevss requested review from jedel1043 and a team February 18, 2025 16:56
@raskad raskad requested a review from a team February 18, 2025 17:32
@jedel1043 jedel1043 added this pull request to the merge queue Feb 19, 2025
Merged via the queue into main with commit f0abe2c Feb 19, 2025
14 checks passed
@jedel1043 jedel1043 deleted the impl-dt-round branch February 19, 2025 05:49
jedel1043 pushed a commit to boa-dev/temporal that referenced this pull request Feb 19, 2025
This PR requires a little more testing, but posting as a draft in the
meantime.

The changes made are related to adding validation details in
boa-dev/boa#4164 into `temporal_rs`'s unit validations, which is
incredibly important for `PlainDateTime::round` conformance.
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tracking issue for the Temporal builtin
3 participants