Skip to content

feat(intl): implement Temporal.Instant.prototype.toLocaleString#5096

Open
JkrishnaD wants to merge 2 commits intoboa-dev:mainfrom
JkrishnaD:feat/temporal-instant-tolocalestring
Open

feat(intl): implement Temporal.Instant.prototype.toLocaleString#5096
JkrishnaD wants to merge 2 commits intoboa-dev:mainfrom
JkrishnaD:feat/temporal-instant-tolocalestring

Conversation

@JkrishnaD
Copy link
Copy Markdown
Contributor

This Pull Request fixes/closes #5087.

It changes the following:

  • Implements steps 1 & 2 of the spec: validates this is a Temporal.Instant objectScreenshot 2026-03-15 at 1 38 23 PM
  • Accepts locales and options arguments (previously ignored with _)
  • Falls back to to_ixdtf_string_with_provider until Intl.DateTimeFormat integration is complete
  • Removes the vague TODO: Update for ECMA-402 compliance comment.

Full Intl.DateTimeFormat integration (steps 3 & 4) is blocked on #5080, which adds format_date_time_locale and FormatDefaults::All. Once that merges, this can be updated to use that function directly.

Spec: https://tc39.es/proposal-temporal/#sec-temporal.instant.tolocalestring

@github-actions github-actions bot added the Waiting On Review Waiting on reviews from the maintainers label Mar 15, 2026
@github-actions github-actions bot added this to the v1.0.0 milestone Mar 15, 2026
@github-actions github-actions bot added the C-Builtins PRs and Issues related to builtins/intrinsics label Mar 15, 2026
@github-actions
Copy link
Copy Markdown

Test262 conformance changes

Test result main count PR count difference
Total 52,963 52,963 0
Passed 50,070 50,070 0
Ignored 2,072 2,072 0
Failed 821 821 0
Panics 0 0 0
Conformance 94.54% 94.54% 0.00%

Tested main commit: 3016f492d02a06033e11269fdcef603d293222c4
Tested PR commit: ceab2130bac11923ce54e63089ddc7cca2b28c70
Compare commits: 3016f49...ceab213

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 15, 2026

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.65%. Comparing base (6ddc2b4) to head (84da348).
⚠️ Report is 921 commits behind head on main.

Files with missing lines Patch % Lines
core/engine/src/builtins/temporal/instant/mod.rs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #5096       +/-   ##
===========================================
+ Coverage   47.24%   59.65%   +12.41%     
===========================================
  Files         476      589      +113     
  Lines       46892    63473    +16581     
===========================================
+ Hits        22154    37866    +15712     
- Misses      24738    25607      +869     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JkrishnaD JkrishnaD marked this pull request as ready for review March 15, 2026 08:38
@JkrishnaD
Copy link
Copy Markdown
Contributor Author

@jedel1043 this pr is just a base and waiting for the #5080 get merged as in that we get to_locale_string which we can use directly in here

@jedel1043
Copy link
Copy Markdown
Member

jedel1043 commented Mar 16, 2026

Marking as blocked on #5080

@jedel1043 jedel1043 added Blocked Waiting for another code change and removed Waiting On Review Waiting on reviews from the maintainers labels Mar 16, 2026
@JkrishnaD JkrishnaD force-pushed the feat/temporal-instant-tolocalestring branch from ceab213 to 84da348 Compare March 29, 2026 07:40
@github-actions github-actions bot added the Waiting On Review Waiting on reviews from the maintainers label Mar 29, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 29, 2026

Test262 conformance changes

Test result main count PR count difference
Total 52,963 52,963 0
Passed 50,735 50,737 +2
Ignored 1,426 1,426 0
Failed 802 800 -2
Panics 0 0 0
Conformance 95.79% 95.80% +0.00%
Fixed tests (2):
test/intl402/Temporal/Instant/prototype/toLocaleString/default-includes-time-not-time-zone-name.js (previously Failed)
test/intl402/Temporal/Instant/prototype/toLocaleString/dateStyle.js (previously Failed)

Tested main commit: f5e88de558e038f0ae675a012d59917a098f44b6
Tested PR commit: 9e44160994108136bf40c53a846efd480ebd8328
Compare commits: f5e88de...9e44160

@JkrishnaD JkrishnaD force-pushed the feat/temporal-instant-tolocalestring branch from 84da348 to fb2d992 Compare March 29, 2026 18:39
@github-actions github-actions bot added the C-Tests Issues and PRs related to the tests. label Mar 29, 2026
@JkrishnaD JkrishnaD force-pushed the feat/temporal-instant-tolocalestring branch from ad81018 to 9e44160 Compare March 29, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Blocked Waiting for another code change C-Builtins PRs and Issues related to builtins/intrinsics C-Tests Issues and PRs related to the tests. Waiting On Review Waiting on reviews from the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Temporal.Instant.prototype.toLocaleString

2 participants