Please look at http://jsbin.com/mehowehase/1/edit?html,js,console
var dt = new Date();
var x = dt.toLocaleDateString();
console.log("length : "+x.length);
var arr = x.split("/");
console.log("month : "+parseInt(arr[0],10));
In the above the length of x is 14 in IE but 9 in other browsers. Also the month value comes as NaN. Is this a bug in IE. How can we fix this.