ie浏览器不兼容-分割的时间格式,转换为/计算时间差值
if(rowData.ghsj != null ) {
var now = new Date();
var currentdate = now.getTime();
//兼容ie把-转换为/
var time = rowData.ghsj.replace(new RegExp(/-/gm) ,"/").toString().substring(0,19);
//alert(time.substring(0.19));
var secondDate = new Date(time);
//取两个时间的毫秒差
var diff = currentdate - secondDate;
// alert(diff);
var result = parseInt(diff / (1000 * 60 * 60 * 24));
return result+1;
}else{
return 0;
}