how to get next week date in javascript

前端 未结 7 1527
不知归路
不知归路 2020-12-08 19:21

Does anyone know how can I get next week date based on this week date? example if I have this thursday date (25/6/2009) how can I use javascript to get next thursday date (2

7条回答
  •  悲哀的现实
    2020-12-08 20:04

    Date.prototype.addDays = function (d) {
        if (d) {
            var t = this.getTime();
            t = t + (d * 86400000);
            this.setTime(t);
        }
    };
    
    this_week.addDays(7);
    

提交回复
热议问题