I have a function that formats date using date.toLocaleDateString I see that when I have locale set to 'Arabic' the results in Chrome are different from what is on FF and Safari.
let date = new Date();
const dateOptions = {
day: "2-digit",
month: "2-digit",
year: "numeric"
};
console.log(date.toLocaleDateString("ar", dateOptions));
Here is the code-sandbox link https://codesandbox.io/s/loving-haslett-mj6b0?file=/src/index.js
In chrome, date shows up as 27/01/2021 whereas in FF and Safari, it is converted to Arabic.
How can we ensure consistency across browsers?