Skip to content

Conversation

@mhdawson
Copy link
Member

Running the same in the icu doc shows that for
icu-small the output is January instead of M01. Update
the example in the doc to match.

Signed-off-by: Michael Dawson [email protected]

Running the same in the icu doc shows that for icu-small the output is January instead of M01. Update the example in the doc to match. Signed-off-by: Michael Dawson <[email protected]>
@nodejs-github-botnodejs-github-bot added the doc Issues and PRs related to the documentations. label Jun 27, 2022
@mhdawson
Copy link
MemberAuthor

@srl295 does this make sense to you? I suspect at one point it printed M01 but currently it seems to default to using the english value instead of the code when the data is not available.

Copy link
Member

@srl295srl295 left a comment

Choose a reason for hiding this comment

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

This has been true all the way back to v0.12.18!

@srl295
Copy link
Member

I think this was probably true for an interim version where the manifest (list of installed locales) wasn't updated properly. But yes , it should resolve to your user's default (such as en-US).

>spanish.resolvedOptions();{locale: 'en-US', numberingSystem: 'latn', calendar: 'gregory', timeZone: 'America/Chicago', month: 'long' }

@srl295
Copy link
Member

OK stop press. issue…

@srl295
Copy link
Member

$ env LANG=es_US node -p 'new Intl.DateTimeFormat("es",{month: "long" }).format(new Date(9e8));' M01 $ env LANG=en_US node -p 'new Intl.DateTimeFormat("es",{month: "long" }).format(new Date(9e8));' January

🤦 user environment sensitive tests…

@srl295
Copy link
Member

fyi @nodejs/i18n-api

Co-authored-by: Steven R. Loomis <[email protected]>
@mhdawson
Copy link
MemberAuthor

@srl295 thanks for catching that its dependent on the default locale. That may help resolve the original question I had which led me to look at this doc/find the difference.

@mhdawson
Copy link
MemberAuthor

Landed in bbab209

mhdawson added a commit that referenced this pull request Jun 30, 2022
Running the same in the icu doc shows that for icu-small the output is January instead of M01. Update the example in the doc to match. Signed-off-by: Michael Dawson <[email protected]> PR-URL: #43591 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Steven R Loomis <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
targos pushed a commit that referenced this pull request Jul 12, 2022
Running the same in the icu doc shows that for icu-small the output is January instead of M01. Update the example in the doc to match. Signed-off-by: Michael Dawson <[email protected]> PR-URL: #43591 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Steven R Loomis <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
@targostargos mentioned this pull request Jul 12, 2022
targos pushed a commit that referenced this pull request Jul 20, 2022
Running the same in the icu doc shows that for icu-small the output is January instead of M01. Update the example in the doc to match. Signed-off-by: Michael Dawson <[email protected]> PR-URL: #43591 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Steven R Loomis <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
targos pushed a commit that referenced this pull request Jul 31, 2022
Running the same in the icu doc shows that for icu-small the output is January instead of M01. Update the example in the doc to match. Signed-off-by: Michael Dawson <[email protected]> PR-URL: #43591 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Steven R Loomis <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
@targostargos mentioned this pull request Aug 3, 2022
guangwong pushed a commit to noslate-project/node that referenced this pull request Oct 10, 2022
Running the same in the icu doc shows that for icu-small the output is January instead of M01. Update the example in the doc to match. Signed-off-by: Michael Dawson <[email protected]> PR-URL: nodejs/node#43591 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Steven R Loomis <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docIssues and PRs related to the documentations.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@mhdawson@srl295@jasnell@tniessen@nodejs-github-bot