How To Get Tomorrow Date Using Node Js?
Dec 14, 2021 . Admin
Hello Friends,
Now let's see example of how to get tomorrow date example. We will check how to get tomorrow date. This is a short guide on get tomorrow date in node js. Let's get started with how to get tomorrow date in node js.
Here i will give you many example how to get tomorrow date using node js.
Example 1 :
Run following command to create node app.
mkdir my-app cd my-app npm initStep 2 : Create server.js file
server.js
const todayDt = new Date() const tomorrowDt = new Date(todayDt) tomorrowDt.setDate(tomorrowDt.getDate() + 1) console.log(tomorrowDt);
now you can simply run by following command:
node server.jsOutput :
2021-12-14T13:01:52.537Z
Example 2 :
Step 1 : Create Node AppRun following command to create node app.
mkdir my-app cd my-app npm initStep 2 : Create server.js file
server.js
const tomorrowDt = new Date(); tomorrowDt.setDate(tomorrowDt.getDate() + 1); console.log(tomorrowDt);
now you can simply run by following command:
node server.jsOutput :
2021-12-14T13:09:46.649Z
It will help you...