Add one day to date in javascript

后端 未结 8 1312
再見小時候
再見小時候 2020-12-14 06:00

I am sure that a lot of people asked this question but when I checked the answers it seems to me that they are wrong that what I found

var startDate = new Da         


        
8条回答
  •  不知归路
    2020-12-14 06:14

    I think what you are looking for is:

    startDate.setDate(startDate.getDate() + 1);
    

    Also, you can have a look at Moment.js

    A javascript date library for parsing, validating, manipulating, and formatting dates.

提交回复
热议问题