1 取当天时间0点的毫秒数:new Date(new Date().toLocaleDateString())当天0点 var current = new Date(new Date().toLocaleDateString()).getTime(); 2 取另个日期的0点毫秒数:用“yyyy-MM-dd”初始化new Date(“yyyy-MM-dd”) var hbpNextFollowupDate = new Date(hbpNextFollowupDate.getTime(); 3计算相隔天数 var isInSevenHbp = (hbpNextFollowupDate-current)/86400000;
08-03
1889
08-03
262
06-22
5359
05-05
1699