how do I subtract one week from this date in jquery?

You can modify a date using setDate. It automatically corrects for shifting to new months/years etc.

var oneWeekAgo = new Date();
oneWeekAgo.setDate(oneWeekAgo.getDate() - 7);

And then go ahead to render the date to a string in any matter you prefer.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)