时间戳转换,时间戳之间的天数差
// 获取当前时间
let Time = new Date();
// 转换为时间戳
Time.getTime();
时间戳天数差
<! sDate1 , sDate2 是时间戳---->
ConTime(sDate1,sDate2){
<! timeNumber 是天数 ---->
this.timeNumber = parseInt(Math.abs(sDate2 - sDate1) / 1000 / 60 / 60 / 24) +1; //把相
},
评论