📅  最后修改于: 2022-03-11 15:02:40.834000             🧑  作者: Mango
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)
}