Skip to content
Snippets Groups Projects
Commit bb0fc4d3 authored by Benni Mack's avatar Benni Mack
Browse files

[FEATURE] Introduce php-intl based date&time formatting

A new stdWrap "formattedDate" feature is added,
which uses the ICU-based pattern formatting
see https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax

In addition, the DateViewHelper (<f:format.date>)
now allows to set a `pattern` value,
which - if given - also uses the ICU-based pattern
formatting.

All of the features are based on the given Locale,
so no need for using the system-wide "setlocale"
functionality is needed anymore, as the tests show.

The ICU-based pattern allows for much more flexible
and fine-grained date formatting, such as

* Quarter of the year (QQQQ)
* Day of week in month (F)
* Milliseconds in day (A)

Resolves: #100187
Releases: main
Change-Id: I6f90a5cb73ea48cabf6b11662c8b28d7c21bca1a
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78120


Tested-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarOliver Bartsch <bo@cedev.de>
parent 6df61f76
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment