title: find date months ago, will it miss dates if current month is shorter?
body: <p>I am writing a script to query dates "3 months ago". As I am thinking about making sure I do not miss anything, I am using this for comparison:</p>
  
  <pre><code>$date = date("Y-m-d",mktime(0,0,0,date("m")-$months_ago,date("d")));
  </code></pre>
  
  <p>I am realizing there is a chance I could be missing dates. For example, if I search on 11/30 for dates three months ago, I will get 8/30. But the next day is 12/1 and three months prior is 9/1. So in this script I have missed 8/31. </p>
  
  <p>I guess the best method is to use days (90 days) instead on months. Is this the best practice for something like this?</p>