10000 Add single-digit example to toLocaleString() by dipikabh · Pull Request #41410 · mdn/content · GitHub
[go: up one dir, main page]

Skip to content

Conversation

dipikabh
Copy link
Contributor
@dipikabh dipikabh commented Oct 6, 2025

Description

Addressing the issue raised in https://github.com/orgs/mdn/discussions/836.

This PR adds a new example to toLocaleString() to demo how to control single- vs double-digits in the day/month output.

For the existing example, I noticed slightly different outputs in my time zone, so I've added comments to clarify why that might happen.

@dipikabh dipikabh requested a review from a team as a code owner October 6, 2025 22:08
@dipikabh dipikabh requested review from Josh-Cena and removed request for a team October 6, 2025 22:08
@github-actions github-actions bot added Content:JS JavaScript docs size/s [PR only] 6-50 LoC changed labels Oct 6, 2025
…alestring/index.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Contributor
github-actions bot commented Oct 6, 2025

Preview URLs

(comment last updated: 2025-10-06 22:12:07)

Copy link
Member
@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

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

The toLocaleString page is intentionally thin because substantial documentation about the options should go into Intl.DateTimeFormat(). Could you move it there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:JS JavaScript docs size/s [PR only] 6-50 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0