I have two dates which are in Long string format like "Thu Apr 11 2013 23:59:59 GMT+0530 (India Standard Time)" and I want to take difference between them.
Code :
var x = "Thu Apr 11 2013 23:59:59 GMT+0530 (India Standard Time)"
var today = new Date();
var diff = today.getDate() - x;
alert(diff);