Javascript Date: next month

后端 未结 8 1445
情深已故
情深已故 2020-11-28 10:01

I\'ve been using Javascript\'s Date for a project, but noticed today that my code that previously worked is no longer working correctly. Instead of producing Feb as expected

8条回答
  •  遥遥无期
    2020-11-28 10:09

    You can use the date.js library:

    http://code.google.com/p/datejs/

    And just do this

    Date.today().next().month();
    

    You will have the exact value for today + 1 month (including days)

提交回复
热议问题