title: Zend Date -- day difference
body: <p>I have the below line of codes </p>
  
  <pre><code>$day1 = new Zend_Date('2010-03-01', 'YYYY-mm-dd');
  $day2 = new Zend_Date('2010-03-05', 'YYYY-mm-dd');
  $dateDiff = $day2-&gt;getDate()-&gt;get(Zend_Date::TIMESTAMP) - $day1-&gt;getDate()-&gt;get(Zend_Date::TIMESTAMP);
  $days = floor((($dateDiff / 60) / 60) / 24);
  return  $days;  
  </code></pre>
  
  <p>this will return 4</p>
  
  <p>But if gave </p>
  
  <pre><code>$day1 = new Zend_Date('2010-02-28', 'YYYY-mm-dd');
  $day2 = new Zend_Date('2010-03-01', 'YYYY-mm-dd');
  $dateDiff = $day2-&gt;getDate()-&gt;get(Zend_Date::TIMESTAMP) - $day1-&gt;getDate()-&gt;get(Zend_Date::TIMESTAMP);
  $days = floor((($dateDiff / 60) / 60) / 24);
  return  $days; 
  </code></pre>
  
  <p>it will return -27 .. how will i get right answer</p>