Closed Bug 1780530 Opened 4 years ago Closed 4 years ago

Intl.DateTimeFormat wrong output for pt-PT

Categories

(Core :: JavaScript: Internationalization API, defect, P3)

defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: hafan72971, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36

Steps to reproduce:

pt-PT and pt-BR are quite the same on most instances, but for some reason, the outputs produced by the DateTimeFormat.format function are quite different between both locales, and this seems to be wrong. When requiring month: 'short', that notation is not even being considered for the pt-PT locale.

From some additional experiences I've done, this is also happening for the formatRange function as well.

This is the first bug I've opened. If for some reason this is not the right the place, would you be so kind to let me know where I can correctly report it? Thanks

const date = new Date(Date.UTC(2022, 5, 10));
const options = { month: 'short', day: 'numeric'};

console.log(new Intl.DateTimeFormat('pt-BR', options).format(date));
console.log(new Intl.DateTimeFormat('pt-PT', options).format(date));

Actual results:

"10 de jun."
"10/06"

Expected results:

"10 de jun."
"10 de jun."

This looks like an intentional difference when reading the underlying CLDR data:

If this format doesn't follow the standard format used in Portugal, it should be reported at https://unicode-org.atlassian.net.

Assuming André is correct, then our implementation is compliant with the standard.
Thus flagging this issue as works-for-me.

Feel free to re-open this issue if there is a problem in our implementation of the standard.

Severity: -- → S4
Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Priority: -- → P3
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.