JS 几天后过期
function CheckInfoDate(infodate) {
var today = new Date().getTime();
var theday = Date.parse(infodate.replace(/(\d+)-(\d+)-(\d+)/, '$2/$3/$1'));
if (today >= theday)
console.log("已过期")
else
console.log('还剩' + Math.floor((theday - today) / (24 * 3600 * 1000)) + '天');
}