-2
我不能工作了逻辑来检测,如果它是过去的某个时刻尚未...检测是否是过去某个时刻(如15:00)
var now = new Date();
if(now.getHours() <= 15 && now.getMinutes() < 1) console.log("It's before 3pm");
我不能工作了逻辑来检测,如果它是过去的某个时刻尚未...检测是否是过去某个时刻(如15:00)
var now = new Date();
if(now.getHours() <= 15 && now.getMinutes() < 1) console.log("It's before 3pm");
哎呀,真有点傻
var now = new Date();
if(now.getHours() >= 15) console.log('Past 3pm');
14:30在15:00之前,因此您可以看到您不希望将限制添加到分钟。只要少于15小时就可以 – fejese 2014-11-05 11:27:29