Hello, can anyone tell me how i can get current date in format[yyyy-MM-dd
HH:mm:ss]
milesap wrote:
>
> 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-tp22921295p22950241.html
Sent from the Zend Framework mailing list archive at Nabble.com.