From 20c819ee634df5814a5a1cb57873226c3143effc Mon Sep 17 00:00:00 2001 From: mricoul Date: Fri, 14 Aug 2026 14:25:18 +0200 Subject: [PATCH] feat(Datetime): add Datetime helper --- functions.php | 1 + inc/Helpers/Formatting/Datetime.php | 86 +++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 inc/Helpers/Formatting/Datetime.php diff --git a/functions.php b/functions.php index 1793228..1497288 100644 --- a/functions.php +++ b/functions.php @@ -24,6 +24,7 @@ function () { ); require_once __DIR__ . '/inc/Helpers/Svg.php'; +require_once __DIR__ . '/inc/Helpers/Formatting/Datetime.php'; require_once __DIR__ . '/inc/Helpers/Formatting/Escape.php'; require_once __DIR__ . '/inc/Helpers/Formatting/Image.php'; require_once __DIR__ . '/inc/Helpers/Formatting/Link.php'; diff --git a/inc/Helpers/Formatting/Datetime.php b/inc/Helpers/Formatting/Datetime.php new file mode 100644 index 0000000..bd8cb4a --- /dev/null +++ b/inc/Helpers/Formatting/Datetime.php @@ -0,0 +1,86 @@ + markup. + * + * @usage BEA\Theme\Framework\Helpers\Formatting\Datetime\the_datetime( get_the_date( 'd.m.Y' ), [ 'datetime' => get_the_date( 'Y-m-d' ), 'class' => 'crd__date' ] ); + * + * @param string $display_date Formatted date string shown to users. + * @param array $settings { + * Optional. Settings for the datetime markup. + * + * @type string $before Markup before the