From ff5646ef77471791d4306e63e8e709fe1a9d62f6 Mon Sep 17 00:00:00 2001 From: vince Date: Sun, 5 Dec 2021 23:01:04 +0100 Subject: [PATCH] =?UTF-8?q?ajoute=20quelques=20d=C3=A9tails=20esth=C3=A9ti?= =?UTF-8?q?ques?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.php | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/index.php b/index.php index 2782831..2543228 100644 --- a/index.php +++ b/index.php @@ -20,7 +20,7 @@ if ($hasSupplier) { $config[$supplier] = array_merge( [ - 'title' => '%supplier% %event%', + 'title' => '%supplier% %date%', 'description' => '', 'choices' => [], 'start' => 'now 00:00:00', @@ -163,6 +163,8 @@ if (!$isConfig and $hasSupplier) { } } + $date = (new \IntlDateFormatter('fr_FR.UTF8', \IntlDateFormatter::FULL, \IntlDateFormatter::NONE, 'Europe/Paris'))->format(new \DateTime($event)); + while (preg_match('/%([^%]+)%/i', $config[$supplier]['title'], $match)) $config[$supplier]['title'] = str_replace( $match[0], @@ -189,7 +191,7 @@ if (!$isConfig and $hasSupplier) {