how to get next week date in javascript

前端 未结 7 1495
不知归路
不知归路 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:12
    const getDateAfterWeek = (week) => {
    let today = new Date();
      const nextweek = new Date(
        today.getFullYear(),
        today.getMonth(),
        today.getDate() + 7 * week,
      );
      return nextweek;
    }
    
    0 讨论(0)
提交回复
热议问题