Note the difference between "Y" and "y".
Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com
----- Original Message -----
From: "milesap" <[email protected]>
To: <[email protected]>
Sent: Tuesday, April 07, 2009 4:51 AM
Subject: [fw-general] Zend_Date Problems
Hello,
I'm fairly new to Zend Framework, so forgive me if this is a really easy
question. I have been looking everywhere for a solution. I am trying to
get
the difference between the current date and a persons birthday to see how
old they are.
$date = new Zend_Date();
$date->sub('April 3, 1980');
print $date->toString('Y');
The following prints 28, however the correct age would be 29, as the
persons
birthday was a few days ago. Does it not take the month and day into
account
when it subs the date? Or a better question would be what am I doing
wrong?
I have set my default timezone correctly.
--
View this message in context:
http://www.nabble.com/Zend_Date-Problems-tp22921295p22921295.html
Sent from the Zend Framework mailing list archive at Nabble.com.