📅  最后修改于: 2022-03-11 14:58:48.687000             🧑  作者: Mango
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