-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
doc: fix icu-small example #43591
Conversation
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>
@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. |
There was a problem hiding this 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!
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 > spanish.resolvedOptions();
{ locale: 'en-US',
numberingSystem: 'latn',
calendar: 'gregory',
timeZone: 'America/Chicago',
month: 'long' } |
OK stop press. issue… |
$ 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… |
fyi @nodejs/i18n-api |
Co-authored-by: Steven R. Loomis <srl295@gmail.com>
@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. |
Landed in bbab209 |
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>
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>
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>
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>
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>
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