title: Get date prior to 30 days from today and prior to 12 months from today
body: <p>I want to get date prior to 30 days from today and prior to 12 months from today. How Do I do that and format as mm/dd/yyyy</p>
  
  <p>This is what I have done to set current date so far:</p>
  
  <pre><code>                var today = new Date();
                  var dd = today.getDate();
                  var mm = today.getMonth() + 1;
                  var yyyy = today.getFullYear();
  
                  if (dd&lt;10)
                  dd = '0'+dd;
  
                  if (mm&lt;10)
                  mm = '0'+mm;
  
                  today = mm+'/'+dd+'/'+yyyy;
  </code></pre>