title: Get last week date with jQuery/Javascript
body: <p>I'm trying to get the last week date in JavaScript, without the time.</p>
  
  <p>So for example, <code>10-02-2012</code>, instead of <code>10-02-12 13:34:56 GMT</code>.</p>
  
  <p>Is there an easy solution out there for this?</p>
  
  <p>Thank you!</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>I'm trying to make this dynamic, so that the resulting variable is always one week before the current date. Here's what I've done to calculate the today variable, if this helps or can be used!</p>
  
  <pre class="lang-js prettyprint-override"><code>var currentTime = new Date();
  var month = currentTime.getMonth() + 1
  var day = currentTime.getDate();
  var year = currentTime.getFullYear();
  var today = month + "-" + day + "-" + year;
  alert(today)
  </code></pre>