//计算两个日期相差的天数
const diffDays = (date, otherDate) => Math.ceil(Math.abs(date - otherDate) / (1000 * 60 * 60 * 24));
一行代码参考网址:https://1loc.dev/
//计算两个日期相差的天数
const diffDays = (date, otherDate) => Math.ceil(Math.abs(date - otherDate) / (1000 * 60 * 60 * 24));
一行代码参考网址:https://1loc.dev/