📌  相关文章
📜  检查日期是否在范围 javascript - 任何代码示例之间

📅  最后修改于: 2022-03-11 14:58:48.687000             🧑  作者: Mango

代码示例2
var a = new Date(2014, 0, 1);
var b = new Date(2014, 0, 2);

var c = new Date(b.getTime());   // clone the date to not muck the original value
c.setDate(c.getDate()+1);        // add a day
var inRange = dt >= a && dt < c; // use a half-open interval