Repository navigation
Change in behavior of Date.toLocaleDateString() in version 4.2.3 #4159
Description
Activity
- addedi18n-apiIssues and PRs related to Node.js internationalization support.Issues and PRs related to Node.js internationalization support.
on Dec 4, 2015 /cc @srl295, I guess.
I have the same result as @evanlucas on Fedora 23
If I had to venture a guess, it would be that the NodeSource packages weren't built with ICU support until v4.2.3.
"Friday, September 05, 2014"is the formatting for non-i18n builds,"9/5/2014"for small-icu (English only) builds.It shouldn't affect the binaries from https://nodejs.org/dist/v4.2.2/, those have been built with small-icu for some time now.
Results from running
node -pe process.versions.icu.4.2.2: undefined
4.2.3: 56.1Looks like something changed with ICU in the NodeSource build of nodejs packages from version 4.2.2 to 4.2.3.
Probably related to this issue: nodesource/distributions#168
Looking at the output of
process.configbetween NodeSource's packaged versions shows the icu library being compiled in starting with 4.2.3.I don't think that there is anything actionable here, in both cases the method behaves as it should, given the build configuration. Also, this is not related to builds on nodejs.org. Can we close this?
Looks like a change in NodeSource's compilation process, not a change in Node proper. Closing. Thanks!
Yes, sorry, it's to do with a change that was made in the compilation process. We have been building without ICU until now and just turned it on. Frankly it was an oversight and we were keen to rectify it as soon as we became aware of it. The binaries you get from the NodeSource Linux distributions should now be equivalent to the ones available for download at nodejs.com except they are compiled with the appropriate toolchain for each distribution.
/cc @chrislea

I upgraded from version 4.2.2 to version 4.2.3 and noticed a change in the behavior of toLocaleDateString.
This code returns a different string between the two versions:
4.2.2: Friday, September 05, 2014
4.2.3: 9/5/2014
I don't see any notes in the changelog that would suggest this behavior would change.
I'm installing nodejs on Ubuntu Precise using the packages from NodeSource.