Difference between two dates
In response to a mailing list question, Thomas, the lead developer of the I18n components pointed out that to find the difference between two Zend_Dates, you just have to subtract them:
PHP:
- $date = Zend_Date::now();
- $diff = $date->sub($birthdate);
- $diff->toString();
Useful tip, that I've put here mainly so that I can find it again when I need it!


Ernesto Vargas responded on 08 Jul 2008 at 1:32 am #
That tip give you the difference as the a whole date but how can you get the different to get the Age for example?