Node: Intl.DateTimeFormat "short" returns month with a period for "pt-pt" and "pt-br"

Created on 15 Jan 2020  路  1Comment  路  Source: nodejs/node

  • Version: >= 13.4.0
  • Platform: Linux 4.15.0-1052-aws #54-Ubuntu SMP Tue Oct 1 15:43:26 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
  • Subsystem: Intl

It is also happening on MacOS.

I'm updating the nodejs and get some different behavior on Intl.DateTimeFormat for pt-br and pt-pt.

On 13.3.0, I get jan as result.
On 13.4.0 and later, I get jan. (with an period at the end).

To test it, I'm using this code:

node --version
node -e "console.log(new Intl.DateTimeFormat('pt-br', { month: 'short' }).format(new Date()));"

And get these results:

Now using node v13.6.0 (npm v6.13.4)
v13.6.0
jan.


Now using node v13.5.0 (npm v6.13.4)
v13.5.0
jan.


Now using node v13.4.0 (npm v6.13.4)
v13.4.0
jan.


Now using node v13.3.0 (npm v6.13.1)
v13.3.0
jan


Now using node v13.2.0 (npm v6.13.1)
v13.2.0
jan


Now using node v13.1.0 (npm v6.12.1)
v13.1.0
jan


Now using node v13.0.1 (npm v6.12.0)
v13.0.1
jan

I'm changing the versions using nvm:

$ nvm --version
0.34.0

Most helpful comment

Bisected to 0cb7720dd804f629264bd02a675917c87b7f9e0a. It is an ICU update, so probably the new behavior is correct.

>All comments

Bisected to 0cb7720dd804f629264bd02a675917c87b7f9e0a. It is an ICU update, so probably the new behavior is correct.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jmichae3 picture jmichae3  路  3Comments

addaleax picture addaleax  路  3Comments

filipesilvaa picture filipesilvaa  路  3Comments

loretoparisi picture loretoparisi  路  3Comments

seishun picture seishun  路  3Comments