const day = new Date().getDay();
const month = new Date().getMonth();
const week = "星期" + "日一二三四五六".split("")[day];
const currentMonth = month + 1 + "月";
console.log(week, currentMonth);
快速获取今天是几月份和星期几
于 2024-07-08 11:32:20 首次发布