js过期时间

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)) + '天');
			}
上一篇:LeetCode 504.七进制数


下一篇:c++之结构详解