D
D
DoctorDemon2013-02-06 20:56:07
Zend Framework
DoctorDemon, 2013-02-06 20:56:07

Zend_Date

Can someone explain to me why this code produces the following result?

$d = new Zend_Date('2013-02-05 00:00:00', 'Ymd H:i:s');
print($d->get(Zend_Date::DATE_FULL));

Result:
Saturday, January 5, 2013

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
dimmy, 2013-02-06
@dimmi

Probably because Zend's format differs from the standard PHP date/DateTime. m is minutes, not month.
const MINUTE = 'mm';
const MINUTE_SHORT = 'm';
const MONTH = 'MM';
const MONTH_SHORT = 'M';

N
NikitaG, 2013-02-07
@NikitaG

No need to use ZD
Regular php tools are enough for all tasks
ZD is one of the most asshole components in ZF

M
mastini, 2013-02-06
@mastini

Docs: framework.zend.com

M
markoffko, 2013-02-07
@markoffko

offtopic Zend_Date works very(!) slowly, if there is a better way to get rid of it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question