I use toLocaleDateString to get different date formats for different countries.
But on Android then i pass, for example, ‘fr-FR’ or ‘en-GB’, it returns ‘mm-dd-yyy’ format instead of ‘dd-mm-yyyy’. On iOS and desktop it works correct.
Here is my code:
const options = { year: 'numeric', month: '2-digit', day: '2-digit', timeZone: 'UTC', timeZoneName: 'short' };
const localeDate = new Date(date).toLocaleDateString('fr-FR', options);