📜  在 js 中比较日期的字符串 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:12.883000             🧑  作者: Mango

代码示例3
// solution is convert date to time by getTime()
start         = startDate.getTime();
end         = endDate.getTime();
current     = date.getTime();

if (start <= current && current <= end) {
  // do something here
}