I need to decrement a Javascript date by 1 day, so that it rolls back across months/years correctly. That is, if I have a date of \'Today\', I want to get the date for \'Ye
getDate()-1 should do the trick
getDate()-1
Quick example:
var day = new Date( "January 1 2008" ); day.setDate(day.getDate() -1); alert(day);