I want to change date formatting in Symfony 1.4
The default is:
<?php echo $question->getUpdatedAt();
I want my date to be formatted like this: 26/01/2010 - 16h23
I tried using the format_date helper class DateHelper .
Unfortunately, the API is pretty empty (something really needs to be done about this.)
Looking through the source code of the helper, I found that the second argument, the format, could be passed.
I assumed that it uses the same syntax as the PHP date function . But here is what it outputs (the same example as above):
<?php sfContext::getInstance()->getConfiguration()->loadHelpers('Date');
I am sure that I am not the first to have problems with this, but I was googling around and nothing exactly appeared.
Do you have any idea how to format the date in Symfony 1.4?
Guillaume flandre
source share