I am using this code to convert date object to date string.
var startDate = dateObject;
var dateString = startDate.getMonth() + 1 + "/" + startDate.getDate() + "/" + startDate.getFullYear(); // to display in "M/d/yyyy" format
what happens is it take 0.003 sec in IE 10, I am converting more then 10000 dates, it affects the overall performance of my app. Is there is any way to improve the performance?
I am using this code to check performance.
var d = new Date();
var startDate = dateObject;
var dateString = startDate.getMonth() + 1 + "/" + startDate.getDate() + "/" + startDate.getFullYear();
$startTimeCol.html(dateString);
var ticks = ((new Date() - d) / 1000);
console.log("toString: " + ticks + "sec");