News date format

This commit is contained in:
Fred Tempez 2023-02-17 14:35:42 +01:00
parent 38a9ff25e3
commit 4babff486e
2 changed files with 3 additions and 1 deletions

View File

@ -539,6 +539,8 @@ class news extends common
// Mise en forme de la signature
self::$news[$newsIds[$i]]['userId'] = $this->signature($this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'userId']));
}
self::$dateFormat = $this->getData(['module', $this->getUrl(0), 'config', 'dateFormat']);
self::$timeFormat = $this->getData(['module', $this->getUrl(0), 'config', 'timeFormat']);
// Valeurs en sortie
$this->addOutput([
'showBarEditButton' => true,

View File

@ -10,7 +10,7 @@
<?php echo template::ico('user'); ?>
<?php echo $news['userId']; ?>
<?php echo template::ico('calendar-empty'); ?>
<?php echo helper::dateUTF8('%d %B %Y', $news['publishedOn']) . ' - ' . helper::dateUTF8('%H:%M', $news['publishedOn']); ?>
<?php echo helper::dateUTF8($module::$dateFormat, $news['publishedOn']) . ' - ' . helper::dateUTF8($module::$timeFormat, $news['publishedOn']); ?>
<!-- Bloc edition -->
<?php if (