How to get tomorrow’s date with Javascript?

Asked

Viewed 2,365 times

4

Hello.
I have that code:

var datas = new Date();
console.log(datas.toLocaleDateString());

He returns to me: 22/05/2017
Is there any way to make him always return with an extra day? like this: 23/05/2017

1 answer

7


Thus:

var currentDate = new Date();
currentDate.setDate(currentDate.getDate() + 1);

Browser other questions tagged

You are not signed in. Login or sign up in order to post.