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

Bastian Waidelich bastian at typo3.org
Sun Mar 13 16:06:55 CET 2011


Thomas Allmer wrote:

Hi,

> {f:format.date(date: '@{filter.filterValueTo}', format: 'd.m.Y')}

Correct, that's the equivalent to
<f:format.date date="@{filter.filterValueTo}" format="d.m.Y" />

I added a page to the MVC wiki: 
<http://forge.typo3.org/projects/typo3v4-mvc/wiki/Fluid_Inline_Notation>

Best,
Bastian


> On 11.03.2011 21:32, Simon Schaufelberger wrote:
>> 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
>>
>
>



More information about the TYPO3-project-typo3v4mvc mailing list