Is there any way to get system short date format in JavaScript?
For example whether system\'s short date is in American format eg. m/d/Y or in european eg. d/m/Y
for my case i used a custom date that i know what number is day, what is month and what is year so it can possible with a simple replace statement.
let customDate = new Date(2222, 11, 18);
let strDate = customDate.toLocaleDateString();
let format = strDate
.replace("12", "mm")
.replace("18", "dd")
.replace("2222", "yyyy");