Skip to content

Refactor methods related to localized strings in Date#5411

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

Refactor methods related to localized strings in Date#5411
Vellumic wants to merge 8 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: 7ce9cae84ac9bf54fe528bb05b997ac24af808a4
Tested PR commit: a8b821675d338bb47f97a75b5cd24738141fc88a
Compare commits: 7ce9cae...a8b8216

@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.34%. Comparing base (6ddc2b4) to head (a8b8216).
⚠️ Report is 982 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.34%   +13.10%     
===========================================
  Files         476      567       +91     
  Lines       46892    63112    +16220     
===========================================
+ Hits        22154    38086    +15932     
- Misses      24738    25026      +288     

☔ 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.

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