[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:Benni Mack <benni@typo3.org> Reviewed-by:
Oliver Bartsch <bo@cedev.de> Reviewed-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
Oliver Bartsch <bo@cedev.de>
Showing
- typo3/sysext/core/Classes/Localization/DateFormatter.php 61 additions, 0 deletionstypo3/sysext/core/Classes/Localization/DateFormatter.php
- typo3/sysext/core/Documentation/Changelog/12.3/Feature-100187-ICU-basedDateAndTimeFormatting.rst 97 additions, 0 deletions...og/12.3/Feature-100187-ICU-basedDateAndTimeFormatting.rst
- typo3/sysext/core/Tests/Unit/Localization/DateFormatterTest.php 132 additions, 0 deletions...sysext/core/Tests/Unit/Localization/DateFormatterTest.php
- typo3/sysext/fluid/Classes/ViewHelpers/Format/DateViewHelper.php 56 additions, 0 deletions...ysext/fluid/Classes/ViewHelpers/Format/DateViewHelper.php
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Format/DateViewHelperTest.php 30 additions, 0 deletions...ests/Functional/ViewHelpers/Format/DateViewHelperTest.php
- typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php 30 additions, 1 deletion.../frontend/Classes/ContentObject/ContentObjectRenderer.php
- typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php 87 additions, 2 deletions...nd/Tests/Unit/ContentObject/ContentObjectRendererTest.php
Please register or sign in to comment