javascript add day to date
function addDays(date, days) {
var result = new Date(date);
result.setDate(result.getDate() + days);
return result;
}let date = new Date();
// add a day
date.setDate(date.getDate() + 1);var myCurrentDate=new Date();
var myFutureDate=new Date(myCurrentDate);
myFutureDate.setDate(myFutureDate.getDate()+ 8);//myFutureDate is now 8 days in the future
Also in JavaScript:
- promise catch
- remove last element from array javascript
- host angular app on node server
- join three array javascript
- download comma separated file, react
- mongoose create populate response
- vue store access state in actions
- react get data attribute from element
- how to use fetch() to fetch an image from database in js
- get value in tag with id JS
- less than equal to in javascript
- rounding up a number so that it is divisible by 5 javascript
- json beautify
- select all checkboxes html js
- how to use redirect in react
- lexical scope javascript
- convert date to string javascript
- Your global Angular CLI version (11.0.2) is greater than your local version
- manifest.json chrome
- npm package for sorting in reactjs
- javascript create element in a new line
- ScrollController not attached to any scroll views
- regular expression for email and mobile
- variables in js