I have a JavaScript function that displays the date in the browser, but the format changes depending on the browser. For example, when I open my project in Chrome, the format is 4/30/2015, but when I open it in IE, it's displayed as 30 April, 2015. How can I resolve this issue?
document.getElementById(lblClock).innerHTML = nd.toLocaleString();
This is currently how I am implementing it. Is there a way to achieve consistent date formatting without relying on Date.js or moment.js? Any suggestions would be greatly appreciated.