📌  相关文章
📜  检查给定的日期是今天的日期. - Javascript代码示例

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

代码示例1
export const isPreviousDate = (date = new Date()) => {
        const todayDate = moment(new Date(), 'DD-MM-YYYY');
        const givenDate = moment(new Date(date), 'DD-MM-YYYY');
        return givenDate.isBefore(todayDate)
    }