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 天
哈士奇WWW
相关分类