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

Implement PlainDate string methods #4119

Merged
merged 4 commits into from
Jan 12, 2025
Merged

Conversation

nekevss
Copy link
Member

@nekevss nekevss commented Jan 11, 2025

This Pull Request is related to ongoing work for #4071.

It changes the following:

  • Bumps "temporal_rs" to current main
  • Adds PlainDate::to_string and PlainDate::to_json
  • Adds handling for ZonedDateTime objects in to_temporal_instant

Copy link

Test262 conformance changes

Test result main count PR count difference
Total 50,254 50,254 0
Passed 45,007 45,171 +164
Ignored 1,728 1,728 0
Failed 3,519 3,355 -164
Panics 0 0 0
Conformance 89.56% 89.89% +0.33%
Fixed tests (164):
test/intl402/Temporal/PlainDate/prototype/toLocaleString/default-does-not-include-time-and-time-zone-name.js (previously Failed)
test/intl402/Temporal/PlainDate/prototype/toString/calendarname-undefined.js (previously Failed)
test/intl402/Temporal/PlainDate/prototype/toString/calendarname-never.js (previously Failed)
test/intl402/Temporal/PlainDate/prototype/toString/calendarname-auto.js (previously Failed)
test/intl402/Temporal/PlainDate/prototype/toString/options-undefined.js (previously Failed)
test/intl402/Temporal/PlainDate/prototype/toString/calendarname-always.js (previously Failed)
test/intl402/Temporal/PlainDate/prototype/toString/calendarname-critical.js (previously Failed)
test/intl402/Temporal/PlainDate/prototype/toString/calendarname-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/toJSON/name.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/toJSON/length.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/toJSON/branding.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/toJSON/not-a-constructor.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/toJSON/basic.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/toJSON/prop-desc.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/toJSON/builtin.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/toJSON/year-format.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/roundingincrement-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/roundingmode-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/smallestunit-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/roundingmode-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/roundingincrement-non-integer.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/toString/options-object.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/toString/calendarname-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/toString/calendarname-never.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/toString/options-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/toString/calendarname-auto.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/toString/branding.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/toString/basic.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/toString/calendarname-always.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/toString/prop-desc.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/toString/calendarname-critical.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/toString/calendarname-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/toString/calendarname-invalid-string.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/toString/order-of-operations.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/toString/year-format.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/roundingincrement-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/roundingmode-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/smallestunit-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/roundingmode-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/roundingincrement-non-integer.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/round/roundingmode-trunc.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/until/roundingincrement-seconds.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/until/roundingincrement-milliseconds.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/until/roundingincrement-microseconds.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/until/roundingincrement-hours.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/until/roundingincrement-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/until/smallestunit-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/until/roundingmode-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/until/roundingincrement-minutes.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/until/roundingincrement-nanoseconds.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/until/roundingincrement-non-integer.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/since/roundingincrement-nanoseconds.js (previously Failed)
test/built-ins/Temporal/Instant/from/argument-zoneddatetime.js (previously Failed)
test/built-ins/Temporal/Instant/from/year-zero.js (previously Failed)
test/built-ins/Temporal/Instant/from/argument-string-critical-unknown-annotation.js (previously Failed)
test/built-ins/Temporal/Instant/from/argument-string-date-with-utc-offset.js (previously Failed)
test/built-ins/Temporal/Instant/from/argument-object-tostring.js (previously Failed)
test/built-ins/Temporal/Instant/from/argument-string-invalid.js (previously Failed)
test/built-ins/Temporal/Instant/from/argument-string-multiple-time-zone.js (previously Failed)
test/built-ins/Temporal/Instant/from/argument-string-calendar-annotation-invalid-key.js (previously Failed)
test/built-ins/Temporal/Instant/compare/argument-zoneddatetime.js (previously Failed)
test/built-ins/Temporal/Instant/compare/year-zero.js (previously Failed)
test/built-ins/Temporal/Instant/compare/argument-string-critical-unknown-annotation.js (previously Failed)
test/built-ins/Temporal/Instant/compare/argument-string-date-with-utc-offset.js (previously Failed)
test/built-ins/Temporal/Instant/compare/argument-object-tostring.js (previously Failed)
test/built-ins/Temporal/Instant/compare/argument-string-invalid.js (previously Failed)
test/built-ins/Temporal/Instant/compare/argument-string-multiple-time-zone.js (previously Failed)
test/built-ins/Temporal/Instant/compare/argument-string-calendar-annotation-invalid-key.js (previously Failed)
test/built-ins/Temporal/Instant/prototype/round/roundingmode-trunc.js (previously Failed)
test/built-ins/Temporal/Instant/prototype/equals/year-zero.js (previously Failed)
test/built-ins/Temporal/Instant/prototype/equals/argument-string-critical-unknown-annotation.js (previously Failed)
test/built-ins/Temporal/Instant/prototype/equals/argument-string-date-with-utc-offset.js (previously Failed)
test/built-ins/Temporal/Instant/prototype/equals/argument-object-tostring.js (previously Failed)
test/built-ins/Temporal/Instant/prototype/equals/argument-string-invalid.js (previously Failed)
test/built-ins/Temporal/Instant/prototype/equals/argument-string-multiple-time-zone.js (previously Failed)
test/built-ins/Temporal/Instant/prototype/equals/argument-string-calendar-annotation-invalid-key.js (previously Failed)
test/built-ins/Temporal/Instant/prototype/until/year-zero.js (previously Failed)
test/built-ins/Temporal/Instant/prototype/until/argument-string-critical-unknown-annotation.js (previously Failed)
test/built-ins/Temporal/Instant/prototype/until/argument-string-date-with-utc-offset.js (previously Failed)
test/built-ins/Temporal/Instant/prototype/until/roundingincrement-wrong-type.js (previously Failed)
test/built-ins/Temporal/Instant/prototype/until/argument-object-tostring.js (previously Failed)
test/built-ins/Temporal/Instant/prototype/until/roundingmode-undefined.js (previously Failed)
test/built-ins/Temporal/Instant/prototype/until/argument-string-invalid.js (previously Failed)
test/built-ins/Temporal/Instant/prototype/until/smallestunit-wrong-type.js (previously Failed)
test/built-ins/Temporal/Instant/prototype/until/argument-string-multiple-time-zone.js (previously Failed)
test/built-ins/Temporal/Instant/prototype/until/roundingmode-wrong-type.js (previously Failed)
test/built-ins/Temporal/Instant/prototype/until/roundingincrement-non-integer.js (previously Failed)
test/built-ins/Temporal/Instant/prototype/until/argument-string-calendar-annotation-invalid-key.js (previously Failed)
test/built-ins/Temporal/Instant/prototype/since/year-zero.js (previously Failed)
test/built-ins/Temporal/Instant/prototype/since/argument-string-critical-unknown-annotation.js (previously Failed)
test/built-ins/Temporal/Instant/prototype/since/argument-string-date-with-utc-offset.js (previously Failed)
test/built-ins/Temporal/Instant/prototype/since/argument-object-tostring.js (previously Failed)
test/built-ins/Temporal/Instant/prototype/since/argument-string-invalid.js (previously Failed)
test/built-ins/Temporal/Instant/prototype/since/argument-string-multiple-time-zone.js (previously Failed)
test/built-ins/Temporal/Instant/prototype/since/argument-string-calendar-annotation-invalid-key.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/round/year-zero.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/round/relativeto-string-invalid.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/round/throws-on-wrong-offset-for-zoned-date-time-relative-to.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/from/argument-wrong-type.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/from/year-zero.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/from/argument-string-critical-unknown-annotation.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/from/argument-string-no-junk-at-end.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/from/argument-string-sub-minute-offset.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/from/argument-string-multiple-time-zone.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/from/constrain-has-no-effect-on-invalid-iso-string.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/from/argument-string-calendar-annotation-invalid-key.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/compare/argument-propertybag-calendar-year-zero.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/compare/argument-wrong-type.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/compare/year-zero.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/compare/argument-string-critical-unknown-annotation.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/compare/argument-string-date-with-utc-offset.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/compare/argument-string-sub-minute-offset.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/compare/argument-string-multiple-time-zone.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/compare/argument-string-calendar-annotation-invalid-key.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/prototype/equals/argument-wrong-type.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/prototype/equals/year-zero.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/prototype/equals/argument-string-critical-unknown-annotation.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/prototype/equals/argument-string-date-with-utc-offset.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/prototype/equals/argument-string-sub-minute-offset.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/prototype/equals/argument-string-multiple-time-zone.js (previously Failed)
test/built-ins/Temporal/ZonedDateTime/prototype/equals/argument-string-calendar-annotation-invalid-key.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/argument-string-out-of-range.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/argument-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/year-zero.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/argument-string-critical-unknown-annotation.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/argument-string-date-with-utc-offset.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/argument-string-subsecond.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/argument-string-invalid.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/argument-string-multiple-time-zone.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/observable-get-overflow-argument-string-invalid.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/argument-string-calendar-annotation-invalid-key.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/compare/argument-propertybag-calendar-year-zero.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/compare/argument-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/compare/year-zero.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/compare/argument-string-critical-unknown-annotation.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/compare/argument-string-date-with-utc-offset.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/compare/argument-string-multiple-time-zone.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/compare/argument-string-calendar-annotation-invalid-key.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/equals/argument-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/equals/year-zero.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/equals/argument-string-critical-unknown-annotation.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/equals/argument-string-date-with-utc-offset.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/equals/argument-string-multiple-time-zone.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/equals/argument-string-calendar-annotation-invalid-key.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/until/argument-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/until/year-zero.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/until/argument-string-critical-unknown-annotation.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/until/argument-string-date-with-utc-offset.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/until/roundingincrement-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/until/roundingmode-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/until/round-negative-duration.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/until/smallestunit-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/until/argument-string-multiple-time-zone.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/until/roundingmode-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/until/roundingmode-trunc-is-default.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/until/roundingincrement-non-integer.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/until/argument-string-calendar-annotation-invalid-key.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/since/argument-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/since/year-zero.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/since/argument-string-critical-unknown-annotation.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/since/argument-string-date-with-utc-offset.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/since/round-negative-duration.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/since/argument-string-multiple-time-zone.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/since/argument-string-calendar-annotation-invalid-key.js (previously Failed)

@nekevss nekevss requested a review from a team January 11, 2025 17:00
@raskad raskad requested a review from a team January 11, 2025 17:27
@raskad raskad added this to the next-release milestone Jan 11, 2025
@raskad raskad added enhancement New feature or request builtins PRs and Issues related to builtins/intrinsics labels Jan 11, 2025
Copy link
Member

@jasonwilliams jasonwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nekevss nekevss added this pull request to the merge queue Jan 12, 2025
Merged via the queue into main with commit efcafda Jan 12, 2025
13 checks passed
@nekevss nekevss deleted the impl-plaindate-string-methods branch January 12, 2025 19:10
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
None yet
Development

Successfully merging this pull request may close these issues.

3 participants