Skip to content

Refactor methods related to localized strings in Date#5411

Open
Vellumic wants to merge 9 commits into
boa-dev:mainfrom
Vellumic:refactor/date-tolocalestring-methods
Open

Refactor methods related to localized strings in Date#5411
Vellumic wants to merge 9 commits into
boa-dev:mainfrom
Vellumic:refactor/date-tolocalestring-methods

Conversation

@Vellumic

@Vellumic Vellumic commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Refactoring of the logic added by 26271b7. This PR is a prerequisite for #5199

It changes the following:

  • Introduced a shared implementation for toLocaleString, toLocaleDateString, and toLocaleTimeString
  • Removed format_date_time_locale as unnecessary
  • Some related minor improvements

Testing:

  • cargo test -p boa_engine --lib -- date::tests::date_proto_to_locale_string_intl (skipped)
  • cargo test -p boa_engine --features intl_bundled --lib -- date::tests::date_proto_to_locale_string_intl (passed)

@Vellumic Vellumic requested review from a team, jedel1043 and nekevss as code owners June 21, 2026 17:46
@github-actions github-actions Bot added Waiting On Review Waiting on reviews from the maintainers C-Builtins PRs and Issues related to builtins/intrinsics C-Intl Changes related to the `Intl` implementation labels Jun 21, 2026
@github-actions github-actions Bot added this to the v1.0.0 milestone Jun 21, 2026
@Vellumic Vellumic changed the title Refactor the methods related to locale strings in Date Refactor methods related to locale strings in Date Jun 21, 2026
@github-actions

github-actions Bot commented Jun 21, 2026

Copy link
Copy Markdown

Test262 conformance changes

Test result main count PR count difference
Total 53,125 53,125 0
Passed 51,072 51,072 0
Ignored 1,482 1,482 0
Failed 571 571 0
Panics 0 0 0
Conformance 96.14% 96.14% 0.00%

Tested main commit: 8a1e8fe07f626f7a067afc2c9885d5d87de4bb5d
Tested PR commit: 6d3ba017e395c02225a855a18bdce8329592bba7
Compare commits: 8a1e8fe...6d3ba01

@Vellumic Vellumic force-pushed the refactor/date-tolocalestring-methods branch from 505df58 to a8b8216 Compare June 21, 2026 17:59
@Vellumic Vellumic changed the title Refactor methods related to locale strings in Date Refactor methods related to localized strings in Date Jun 21, 2026
@codecov

codecov Bot commented Jun 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.30435% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.33%. Comparing base (6ddc2b4) to head (6d3ba01).
⚠️ Report is 985 commits behind head on main.

Files with missing lines Patch % Lines
core/engine/src/builtins/date/mod.rs 93.33% 1 Missing ⚠️
...e/engine/src/builtins/intl/date_time_format/mod.rs 87.50% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #5411       +/-   ##
===========================================
+ Coverage   47.24%   60.33%   +13.08%     
===========================================
  Files         476      567       +91     
  Lines       46892    63112    +16220     
===========================================
+ Hits        22154    38076    +15922     
- Misses      24738    25036      +298     

☔ View full report in Codecov by Harness.
📢 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.

@Vellumic

Copy link
Copy Markdown
Contributor Author

The Miri check is failing with a runner infrastructure issue (Permission denied (os error 13) in boa_macros). I haven't modified any macros or dependencies, and pushing a fresh commit didn't clear the cache. Could a maintainer please clear the Actions cache or re-run the job?

@Vellumic Vellumic force-pushed the refactor/date-tolocalestring-methods branch from 4766f5f to 20aab27 Compare June 26, 2026 18:12
@Vellumic Vellumic force-pushed the refactor/date-tolocalestring-methods branch from 20aab27 to 6d3ba01 Compare June 27, 2026 18:04
@Vellumic

Copy link
Copy Markdown
Contributor Author

Looks like a non-empty commit was enough to clear the staled cache and everything should be fine now. Let me know, if you need any changes from my side. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-Builtins PRs and Issues related to builtins/intrinsics C-Intl Changes related to the `Intl` implementation Waiting On Review Waiting on reviews from the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant