📜  在 javascript 代码示例中获取上一周的日期

📅  最后修改于: 2022-03-11 15:01:55.890000             🧑  作者: Mango

代码示例1
function nextweek(){
    var today = new Date();
    var nextweek = new Date(today.getFullYear(), today.getMonth(), today.getDate()+7);
    return nextweek;
}