153
rated 0 times
[
156]
[
3]
/ answers: 1 / hits: 40546
/ 8 Years ago, fri, july 8, 2016, 12:00:00
I need to get today's date -30 days but in the format of: 2016-06-08
I have tried setDate(date.getDate() - 30);
for -30 days.
I have tried date.toISOString().split('T')[0]
for the format.
Both work, but somehow cannot be used together.
More From » javascript