[TYPO3-mvc] format.date not converting from timestamp?

Simon Schaufelberger schaufelREMOVE-MEberger at punkt.de
Fri Mar 11 21:50:48 CET 2011


looks like this is a fluid parse bug because the viewhelper never gets 
called in these cases. no valid input, no output... ;)

Am 11.03.2011 21:32, schrieb Simon Schaufelberger:
> Hi,
> What is the corresponding inline notation for that?
> i am struggeling with it but i don't get it working.
> i tried:
>
> {@{filter.filterValueTo} -> f:format.date(format: 'd.m.Y')}
> {@filter.filterValueTo -> f:format.date(format: 'd.m.Y')}
> {f:format.date(date: @{filter.filterValueTo, format: 'd.m.Y'})}
> {f:format.date(date: @filter.filterValueTo, format: 'd.m.Y')}
>
> Am 19.11.2010 18:18, schrieb Bastian Waidelich:
>> Sy Moen wrote:
>>
>>> I have typo3 4.5alpha 3 installed... and the ViewHelper for format.date
>>> (DateViewHelper.php) throws the, "could not be parsed by DateTime
>>> constructor." error because the $date is a timestamp... which is how it
>>> is stored in the db...
>>
>> Hi Sy ;)
>>
>> Apart from passing a DateTime object you can use all formats from
>> http://de3.php.net/manual/de/datetime.formats.php
>> Unix timestamps have to be prepended with "@"
>>
>> try:
>> <f:format.date format="Y-m-d">@{yourTimestamp}</f:format.date>
>>
>> HTH
>> Bastian
>

-- 
Kind regards,

Schaufi from punkt.de


More information about the TYPO3-project-typo3v4mvc mailing list