function calcDates(sdate, edate)
{
enddate = new Date (edate);
startdate = new Date (sdate);
etime = enddate.getTime();
stime = startdate.getTime();
duration = Math.round((etime-stime)/1000/60/60/24);
}
function calcDates(sdate, edate)
{
enddate = new Date (edate);
startdate = new Date (sdate);
etime = enddate.getTime();
stime = startdate.getTime();
duration = Math.round((etime-stime)/1000/60/60/24);
}
转载于:https://www.cnblogs.com/xuxu7325/archive/2006/05/11/397086.html