TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
DateViewHelper Class Reference
Inheritance diagram for DateViewHelper:
AbstractViewHelper

Public Member Functions

 initializeArguments ()
 
- Public Member Functions inherited from AbstractViewHelper
 setRenderingContext (\TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 
 injectObjectManager (\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager)
 
 injectReflectionService (\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService)
 
 prepareArguments ()
 

Static Public Member Functions

static renderStatic (array $arguments,\Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
 

Protected Attributes

 $escapeChildren = false
 
- Protected Attributes inherited from AbstractViewHelper
 $controllerContext
 
 $objectManager
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractViewHelper
 callRenderMethod ()
 
 getLogger ()
 
 registerRenderMethodArguments ()
 

Detailed Description

Formats an object implementing .

= Examples =

<f:format.date>{dateObject}</f:format.date> <output> 1980-12-13 (depending on the current date) </output>

<f:format.date format="H:i">{dateObject}</f:format.date> <output> 01:23 (depending on the current time) </output>

<f:format.date format="Y" base="{dateObject}">-1 year</f:format.date> <output> 2016 (assuming dateObject is in 2017) </output>

<f:format.date format="d.m.Y - H:i:s">+1 week 2 days 4 hours 2 seconds</f:format.date> <output> 13.12.1980 - 21:03:42 (depending on the current time, see http://www.php.net/manual/en/function.strtotime.php) </output>

<f:format.date format="%d. %B %Y">{dateObject}</f:format.date> <output>

  1. Dezember 1980 (depending on the current date and defined locale. In the example you see the 1980-12-13 in a german locale) </output>

{f:format.date(date: dateObject)} <output> 1980-12-13 (depending on the value of {dateObject}) </output>

{dateObject -> f:format.date()} <output> 1980-12-13 (depending on the value of {dateObject}) </output>

Definition at line 84 of file DateViewHelper.php.

Member Function Documentation

initializeArguments ( )

Initialize arguments

Definition at line 98 of file DateViewHelper.php.

static renderStatic ( array  $arguments,
\Closure  $renderChildrenClosure,
RenderingContextInterface  $renderingContext 
)
static
Parameters
array$arguments
\Closure$renderChildrenClosure
RenderingContextInterface$renderingContext
Returns
string
Exceptions
Exception

Definition at line 114 of file DateViewHelper.php.

References $GLOBALS, and MathUtility\canBeInterpretedAsInteger().

Member Data Documentation

$escapeChildren = false
protected

Definition at line 93 of file DateViewHelper.php.