Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion Documentation/Functions/Stdwrap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ formattedDate
.locale
A locale other than the locale of the site language.

.. rubric:: Examples
.. rubric:: Example: Full German output from a date/time value

.. code-block:: typoscript
:caption: EXT:site_package/Configuration/TypoScript/setup.typoscript
Expand All @@ -925,6 +925,8 @@ formattedDate

will result in "Freitag, 17. März 2023 um 03:00:00 Nordamerikanische Westküsten-Sommerzeit".

.. rubric:: Example: Full French output from a relative date value

.. code-block:: typoscript
:caption: EXT:site_package/Configuration/TypoScript/setup.typoscript

Expand All @@ -937,6 +939,19 @@ formattedDate

will result in "dimanche 12 mars 2023 à 11:16:44 heure d’été du Pacifique".

.. rubric:: Example: Custom format from a timestamp

.. code-block:: typoscript
:caption: EXT:site_package/Configuration/TypoScript/setup.typoscript

lib.my_formatted_date = TEXT
lib.my_formatted_date {
value = 1679022000
formattedDate = Y-MM-dd'T'HH:mm:ssZ
}

will return the date in the ISO 8601 format: "2023-03-17T03:00:00+00:00"

.. note::
The timezone will be taken from the setting `date.timezone` in your
:file:`php.ini`.
Expand Down