JavaScript how to get tomorrows date in format dd-mm-yy

后端 未结 15 1590
情歌与酒
情歌与酒 2020-11-29 02:31

I am trying to get JavaScript to display tomorrows date in format (dd-mm-yyyy)

I have got this script which displays todays date in format (dd-mm-yyyy)



        
15条回答
  •  野性不改
    2020-11-29 02:34

    The same as the original answer, but in one line:

    var tomorrow = new Date(Date.now() + 24 * 60 * 60 * 1000)

    The numbers stand for 24 hours 60 minutes 60 seconds 1000 milliseconds.

提交回复
热议问题