Skip to content

feat: implement Temporal.PlainMonthDay.prototype.toLocaleString#5285

Open
Cypher-CP0 wants to merge 1 commit intoboa-dev:mainfrom
Cypher-CP0:temporal-plain-month-day-to-locale-string
Open

feat: implement Temporal.PlainMonthDay.prototype.toLocaleString#5285
Cypher-CP0 wants to merge 1 commit intoboa-dev:mainfrom
Cypher-CP0:temporal-plain-month-day-to-locale-string

Conversation

@Cypher-CP0
Copy link
Copy Markdown

This Pull Request fixes/closes #5085.

It changes the following:

  • Implements Temporal.PlainMonthDay.prototype.toLocaleString in plain_month_day/mod.rs, replacing the previous stub that ignored locales and options arguments and fell back to toString()
  • Adds format_plain_month_day_locale in intl/date_time_format/mod.rs, a new helper that formats a PlainMonthDay using ICU4X directly from month/day fields (using the Temporal spec's reference year 1972) instead of going through the Unix timestamp path used by Date
  • Defaults to { month: "long", day: "numeric" } when no dateStyle, month, or day options are provided, matching ECMA-402 ToDateTimeOptions behaviour for date formatting

Signed-off-by: Cypher-CP0 <prabhatu4559@gmail.com>
@github-actions github-actions bot added the Waiting On Review Waiting on reviews from the maintainers label Mar 30, 2026
@github-actions github-actions bot added this to the v1.0.0 milestone Mar 30, 2026
@github-actions github-actions bot added C-Builtins PRs and Issues related to builtins/intrinsics C-Intl Changes related to the `Intl` implementation labels Mar 30, 2026
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.

Implement Temporal.PlainMonthDay.prototype.toLocaleString

1 participant