SOURCE

var weeks = ['日', '一', '二', '三', '四', '五', '六'];
var appendStr = "";
let startDate = new Date();
let endDate = new Date();
endDate.setDate(startDate.getDate() + 367);
while ((endDate.getTime() - startDate.getTime()) > 0) {
    let month = (startDate.getMonth() + 1).toString().length === 1 ? "0" + (startDate.getMonth() + 1).toString() : (
        startDate.getMonth() + 1);
    let day = startDate.getDate().toString().length === 1 ? "0" + startDate.getDate() : startDate.getDate();
    let week = weeks[startDate.getDay()];
    console.log(month + "-" + day + " 周" + week);
    
    startDate.setDate(startDate.getDate() + 1);
}
console 命令行工具 X clear

                    
>
console