📌  相关文章
📜  javascript 检查时间是否小于 - Javascript 代码示例

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

代码示例1
// Compare two dates (times) in JS
const ONE_DAY = 86400000;

const today = new Date();
const yesterday = new Date(Number(today) - ONE_DAY);
console.log(yesterday < today); // true