Created
October 18, 2022 13:09
-
-
Save Ref-Bit/d16913de7e220b72a252793896e777e2 to your computer and use it in GitHub Desktop.
Add days to date object
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
const addDays = (date, days) => { | |
const result = new Date(date); | |
result.setDate(result.getDate() + days); | |
return result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment