export const isToday = date => {
const today = new Date()
return (
/* eslint-disable operator-linebreak */
date.getDate() === today.getDate() &&
date.getMonth() === today.getMonth() &&
date.getFullYear() === today.getFullYear()
/* eslint-enable */
)
}
判断是否是今天
最新推荐文章于 2024-07-13 02:50:49 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)