Intl.DateTimeFormat does not output same results on different machines

Viewed 166

we have a weird behavior of Intl.DateTimeFormat in our tests (but same in Node or chrome console).

This function :

Intl.DateTimeFormat('en-AU', { year: 'numeric', month: 'short', day: 'numeric' }).format(new Date());

will return month day, year for the CI or my coworkers on mac and linux machines (english language setup).

But it will return day month year on my machine (mac, english language setup).

Example for today it will return Jan 13, 2021 for some and 13 Jan 2021 for others, even though we are relying on the same locale. And it's consistent on machines, results will be the same with jest run, node console or browser console.

Any idea what could cause that ?

0 Answers
Related