转载http://zmfkplj.javaeye.com/blog/401978
//日期比较
function compareDate(dateOne,dateTwo){
var s1 = dateOne.replace(/-/g, "/");
var s2 = dateTwo.replace(/-/g, "/");
s1 = new Date(s1);
s2 = new Date(s2);
var days= s1.getTime() - s2.getTime();
var time = parseInt(days / (1000 * 60 * 60 * 24));
//alert("相差天数: " + days);
return days>0;
}
//日期比较
function compareDate(dateOne,dateTwo){
var s1 = dateOne.replace(/-/g, "/");
var s2 = dateTwo.replace(/-/g, "/");
s1 = new Date(s1);
s2 = new Date(s2);
var days= s1.getTime() - s2.getTime();
var time = parseInt(days / (1000 * 60 * 60 * 24));
//alert("相差天数: " + days);
return days>0;
}