let now = new Date(); // 月份从0开始 let month = new Date().getMonth() + 1 let format_month = ("0" + month).slice(-2); console.log(format_month); // 02
let now = new Date(); // 月份从0开始 let month = new Date().getMonth() + 1 let format_month = ("0" + month).slice(-2); console.log(format_month); // 02