ZF-3185: Allow formating a date on the fly (static method) via Zend_Date


Most of the time, you simply want to just format a date for the output, without struggling around with Zend_Date. Currently you have to do two steps to get that:

$date = new Zend_Date($myUnformattedDate); echo $date->get(Zend_Date::DATE_FULL);

With my patch, you can do that with a single step:

echo Zend_Date::format($myUnformattedDate, Zend_Date::DATE_FULL);


The patch is errorous.

Actually the complete API is object based because it's intention was to be used by date math with fluid interface.

Having same functionality in strict interface could lead to misuse. We will have to look over the cons before we integrate such functionality.

Also WHEN strict functions beside the actual ones are integrated this has to be done for all generic usable functions.

The biggest actual NEG is that the API of Zend_Date is already very big because of it's simplicity and usability. The original intention was not to add functionality until the minimum requirements have been raised and we are able to use the new date extension which is available since PHP 5.2.0.

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.