[TYPO3-mvc] Extbase/Fluid with DateTime objects

Thomas "Thasmo" Deinhamer thasmo at gmail.com
Tue Dec 22 20:51:37 CET 2009


Good evening folks!

Two questions came up working on an extbase-extension.

How can I check if a DateTime Object has a valid value?

Using this viewhelpers, the output is '01.01.1970',
which should NOT be printed:

<f:if condition="{object.dateTimeObject}">
   <f:format.date format="d.m.Y">{object.dateTimeObject}</f:format.date>
</f:if>

In this case, the DateTime object should not get displayed
in the frontend, as it's not set explicitly.

How could this be done?

Thanks a lot,
Thomas


More information about the TYPO3-project-typo3v4mvc mailing list