Am using the following for my date in javascript
I would like to get a date plus 1 more day
so i have
new Date(2018, 1, 12, 10, 30)
THe above creates a date on 12th
Now i would like to get a date 1 week from todat
How do i go about it using Date
A very simple (but ugly) way to do it.
new Date(Date.now() + 604800000);
I guess you could just go:
var date = new Date(2018, 1, 12, 10, 30);
date.setDate(date.getDate() + 7);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With