Skip to content

Instantly share code, notes, and snippets.

@Ref-Bit
Created October 18, 2022 13:09
Show Gist options
  • Save Ref-Bit/d16913de7e220b72a252793896e777e2 to your computer and use it in GitHub Desktop.
Save Ref-Bit/d16913de7e220b72a252793896e777e2 to your computer and use it in GitHub Desktop.
Add days to date object
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