Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: fix icu-small example #43591

Closed
wants to merge 2 commits into from
Closed

doc: fix icu-small example #43591

wants to merge 2 commits into from

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 mdawson@devrus.com

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 <mdawson@devrus.com>
@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label Jun 27, 2022
@mhdawson
Copy link
Member Author

@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

@srl295 srl295 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

srl295 commented Jun 27, 2022

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

srl295 commented Jun 27, 2022

OK stop press. issue…

@srl295
Copy link
Member

srl295 commented Jun 27, 2022

$ 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…

doc/api/intl.md Outdated Show resolved Hide resolved
@srl295
Copy link
Member

srl295 commented Jun 27, 2022

fyi @nodejs/i18n-api

Co-authored-by: Steven R. Loomis <srl295@gmail.com>
@mhdawson
Copy link
Member Author

@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
Member Author

Landed in bbab209

@mhdawson mhdawson closed this Jun 30, 2022
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 <mdawson@devrus.com>

PR-URL: #43591
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
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 <mdawson@devrus.com>

PR-URL: #43591
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
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 <mdawson@devrus.com>

PR-URL: #43591
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
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 <mdawson@devrus.com>

PR-URL: #43591
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
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 <mdawson@devrus.com>

PR-URL: nodejs/node#43591
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants