TYPO3
7.6
|
Static Public Member Functions | |
static | renderStatic (array $arguments,\Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) |
Static Public Member Functions inherited from AbstractViewHelper | |
static | renderStatic (array $arguments,\Closure $renderChildrenClosure,\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext) |
Static Public Member Functions inherited from CompilableInterface | |
static | renderStatic (array $arguments,\Closure $renderChildrenClosure,\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext) |
Protected Attributes | |
$escapingInterceptorEnabled = false | |
Protected Attributes inherited from AbstractViewHelper | |
$arguments | |
$templateVariableContainer | |
$controllerContext | |
$renderingContext | |
$renderChildrenClosure = null | |
$viewHelperVariableContainer | |
$objectManager | |
$escapingInterceptorEnabled = true | |
Additional Inherited Members | |
Protected Member Functions inherited from AbstractViewHelper | |
registerArgument ($name, $type, $description, $required=false, $defaultValue=null) | |
overrideArgument ($name, $type, $description, $required=false, $defaultValue=null) | |
callRenderMethod () | |
getLogger () | |
buildRenderChildrenClosure () | |
hasArgument ($argumentName) | |
Formats a object.
= 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>
{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 83 of file DateViewHelper.php.
render | ( | $date = null , |
|
$format = '' , |
|||
$base = null |
|||
) |
Render the supplied DateTime object as a formatted date.
mixed | $date | either a DateTime object or a string that is accepted by DateTime constructor |
string | $format | Format String which is taken to format the Date/Time |
mixed | $base | A base time (a DateTime object or a string) used if $date is a relative date specification. Defaults to current time. |
Exception |
Definition at line 101 of file DateViewHelper.php.
References AbstractViewHelper\buildRenderChildrenClosure().
|
static |
array | $arguments | |
\Closure | $renderChildrenClosure | |
RenderingContextInterface | $renderingContext |
Exception |
Definition at line 122 of file DateViewHelper.php.
References $GLOBALS, AbstractViewHelper\$renderChildrenClosure, and MathUtility\canBeInterpretedAsInteger().
|
protected |
Definition at line 88 of file DateViewHelper.php.