Last active
August 4, 2020 06:21
-
-
Save joe-oli/1e10b67581b066f73d46e952a265319a to your computer and use it in GitHub Desktop.
Add 1 day to date in JS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create new Date instance (or use another date, but a JS date object) | |
var date = new Date(); | |
// add a day | |
date.setDate(date.getDate() + 1); | |
//REF: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment