var date = new Date(); var first_date = new Date(date); //Make a copy of the date we want the first and last days from first_date.setUTCDate(1); //Set the day as the first of the month var firstDay = first_date.toJSON().substring(0, 10); console.log(firstDay)我正在處理 Javascript 日期,我堅持在這個日期上添加 7 天
我正在處理 Javascript 日期,我堅持將日期添加 7 天
精慕HU
2023-03-03 10:04:43