FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

doc: fix icu-small example by mhdawson · Pull Request #43591 · nodejs/node · GitHub

/ node Public

doc: fix icu-small example - #43591

Closed
mhdawson wants to merge 2 commits into
nodejs:mainfrom
mhdawson:icu-doc1
Closed

doc: fix icu-small example#43591
mhdawson wants to merge 2 commits into
nodejs:mainfrom
mhdawson:icu-doc1

Conversation

Copy link
Copy Markdown
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 added the doc Issues and PRs related to the documentations. label Jun 27, 2022

Copy link
Copy Markdown
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.

srl295 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

srl295 commented Jun 27, 2022

Copy link
Copy Markdown
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 commented Jun 27, 2022

Copy link
Copy Markdown
Member

OK stop press. issue…

srl295 commented Jun 27, 2022

Copy link
Copy Markdown
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…

Comment thread doc/api/intl.md Outdated

srl295 commented Jun 27, 2022

Copy link
Copy Markdown
Member

fyi @nodejs/i18n-api

Co-authored-by: Steven R. Loomis <srl295@gmail.com>

Copy link
Copy Markdown
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.

Copy link
Copy Markdown
Member Author

Landed in bbab209

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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL