获取当前月份
moment().daysInMonth();
获取指定年月
console.log(moment("2022-01", "YYYY-MM").daysInMonth()) //31
console.log(moment("2022-02", "YYYY-MM").daysInMonth()) //28
moment().daysInMonth();
console.log(moment("2022-01", "YYYY-MM").daysInMonth()) //31
console.log(moment("2022-02", "YYYY-MM").daysInMonth()) //28