title: PHP DateInterval not returning last day of the month
body: <p>I'm using the following code:</p>
  
  <pre><code>public static function getDays($day, $m, $y) {
    $days = new DatePeriod(
      new DateTime("first $day of $m $y"),
      DateInterval::createFromDateString('next ' . $day),
      new DateTime("last day of $m $y")
    );
    foreach ($days as $day) {
      $dates[] = $day-&gt;format("Y-m-d");
    }
    return $dates;
  }
  </code></pre>
  
  <p>It work's for the most part. I give it a range and it returns the date of each day I am after inside the range.</p>
  
  <p>Usage:</p>
  
  <pre><code>foreach(General::getDays('friday',$this-&gt;_uri[2],$this-&gt;_uri[3]) as $date) {
    var_dump($date);
  }
  </code></pre>
  
  <p>In July 2013, this returns the correct 4 results, all friday's in July 2013:</p>
  
  <pre><code>string '2013-07-05' (length=10)
  string '2013-07-12' (length=10)
  string '2013-07-19' (length=10)
  string '2013-07-26' (length=10)
  </code></pre>
  
  <p>However, on a month that the last day is a match to the day occurance I am after (friday for example, May 2013 and January 2014) it misses the last day of the month out of the returned results.</p>
  
  <p>May 2013 results, missing of course the 31st which is a friday:</p>
  
  <pre><code>string '2013-05-03' (length=10)
  string '2013-05-10' (length=10)
  string '2013-05-17' (length=10)
  string '2013-05-24' (length=10)
  </code></pre>
  
  <p>Does anyone have an answer for this? Is this my miss-use of DateInterval or a genuine fault in this class?</p>