if (type != -1) {
//到期时间-转让时间(转让中和已完成)
var d = loan.interestEndDate;
//将日期格式(2016-6-7)转化为毫秒
var c = d.replace(new RegExp("-", "gm"), "/");
var z = (new Date(c)).getTime();
var transferdate = new Date(); //转让时间
transferdate.setTime(loan.transferDate);
var diffs = z - transferdate.getTime();
var remainingtime = Math.floor(diffs / (24 * 3600 * 1000));
}
JS计算时间差
最新推荐文章于 2023-05-30 17:40:32 发布