DateViewHelper

final class \TYPO3\CMS\Fluid\ViewHelpers\Format\DateViewHelper

Extends
AbstractViewHelper

ViewHelper to format an object implementing `\DateTimeInterface` into human-readable output.

  <f:format.date format="Y-m-d H:i">{dateObject}</f:format.date>
  <f:format.date format="Y" base="{dateObject}">-1 year</f:format.date>
  <f:format.date pattern="dd. MMMM yyyy" locale="de-DE">{dateObject}</f:format.date>

Tags

see
https://docs.typo3.org/permalink/t3viewhelper:typo3-fluid-format-date
see
https://www.php.net/manual/datetime.format.php
see
DateTimeInterface

Table of Contents

Properties

$escapeChildren  : bool
Needed as child node's output can return a DateTime object which can't be escaped

Methods

__construct()  : mixed
getContentArgumentName()  : string
Explicitly set argument name to be used as content.
initializeArguments()  : void
render()  : string

Properties

$escapeChildren

Needed as child node's output can return a DateTime object which can't be escaped

protected bool $escapeChildren = false

Methods

getContentArgumentName()

Explicitly set argument name to be used as content.

public getContentArgumentName() : string

Return values

string

initializeArguments()

public initializeArguments() : void

render()

public render() : string

Return values

string
On this page