title: Get X months from a previous date and back
body: <p>The code below gives me X months from todays date and back, but I want to get the date X months from the 1 st Nov 2012 and back instead. How can this be done?</p>
  
  <pre><code>// $nrOfMonths can be 1, 3 and 6
  
  function GetIncidents(nrOfMonths) {
  
      $stopDate = strtotime('-' . $nrOfMonths .' months');
  
      ... rest of the code ...
  }
  </code></pre>