Logo

Programming-Idioms

History of Idiom 184 > diff from v17 to v18

Edit summary for version 18 by mvett11:
New JS implementation by user [mvett11]

Version 17

2019-09-26, 16:51:19

Version 18

2019-09-26, 16:53:28

Idiom #184 Tomorrow

Assign to variable t a string representing the day, month and year of the day after the current date.

Idiom #184 Tomorrow

Assign to variable t a string representing the day, month and year of the day after the current date.

Code
var tomorrow = new Date();
tomorrow.setDate(tomorrow.getDate() + 1);
Doc URL
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date
Origin
https://stackoverflow.com/questions/3674539/incrementing-a-date-in-javascript/3674550