title: Get remaining days from DateTime Diff
body: <p>I have the following code, which creates a diff from two <code>DateTime</code> objects. </p>
  
  <pre><code>    $fd1=new \DateTime(date("Y-m-d H:i:s"));
      $fd2=new \DateTime();
      $fd2-&gt;setTimestamp($agreements[$i]-&gt;end_date);
      $diff = $fd2-&gt;diff($fd1);
  </code></pre>
  
  <p>I'm trying to derive the remaining days from <code>$fd1</code>, which is today, to <code>$fd2</code>, which is a date in the future. </p>
  
  <p>Here's my attempt. It's faulty though, because some monthes have 30 days and some have 31</p>
  
  <pre><code>    $agreements[$i]-&gt;remaining_date = $diff-&gt;d+($diff-&gt;m*31)+($diff-&gt;y*365);
  </code></pre>
  
  <p>What i'm looking for is the correct number of days remaining from today to the end date</p>