通过年份和月份,获取当月的日信息。

function getDaysInMonthUTC(month, year) {
        var date = new Date(Date.UTC(year, month, 1));
        var days = [];
        while (date.getUTCMonth() === month) {
            days.push(new Date(date));
            date.setUTCDate(date.getUTCDate() + 1);
        }
        return days;
    }

返回值是当月的每日的详细信息