How do I get the difference between 2 dates in full days (I don't want any fractions of a day)
(如何获得整天2个日期之间的差额(我不想一天中的任何时间))
var date1 = new Date('7/11/2010');
var date2 = new Date('12/12/2010');
var diffDays = date2.getDate() - date1.getDate();
alert(diffDays)
I tried the above but this did not work.
(我尝试了上述方法,但这没有用。)
ask by chobo2 translate from so