< CMS Certified Integrator 14 LTS

ViewHelper: Format.date

TYPO3

Show in app

Beschreibung

The f:format.date ViewHelper formats any DateTimeInterface object or date string into a human-readable output within Fluid templates. It supports PHP date format strings, ICU-based (International Components for Unicode) pattern formatting for locale-aware output, timezone control, and relative date expressions via strtotime syntax. Integrators use it whenever dates need to be rendered in a specific format on the frontend.

Ziele

  • I know how to use f:format.date in tag-based and inline notation to output a formatted date.
  • I know what the format argument accepts and how PHP date format characters (e.g. d, m, Y, H:i:s) control the output.
  • I know how to use the pattern argument with ICU format syntax and a locale argument (e.g. de-DE, fr-FR) for locale-aware date rendering.
  • I know how to pass a relative date string such as `+1 week` to compute dates relative to a given point in time.
  • I know that when both format and pattern are provided, pattern takes precedence.
  • I know how to set the timezone argument to control which time zone is used for the rendered output.
  • I know how to use named ICU pattern presets such as FULL, LONG, MEDIUM, and SHORT together with the locale argument to produce fully localised date strings.

Maintainer

Oliver Thiele Web Development Oliver Thiele