Hello
I am trying to make a viewhelper that will return a css class based on the
difference between two dates. I am having trouble obtaining the actual
duration between the dates. Here is what i have:
$date1 = new Zend_Date($date1);
$date2 = new Zend_Date($date2);
$difference = $date1->compare($date2, Zend_Date::DAY);
if($dateDifference > 30){
return 'class = "dateOK"';
}
if($dateDifference < 15){
return 'class = "dateSoon"';
}
if($dateDifference < 3){
return 'class = "dateImminent"';
}
All i am looking for is quite simply the difference between the two dates -
how do i do this with zend_date?
Thanks.
--
View this message in context:
http://www.nabble.com/Comparing-difference-between-2-dates-with-zend_Date-tp19029154p19029154.html
Sent from the Zend Framework mailing list archive at Nabble.com.