From b510c59babd19b77c8e92e7ff054a4982f9e2498 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Mon, 18 Nov 2019 20:18:29 +0100 Subject: [PATCH] Improve date modified returns --- bl-kernel/pagex.class.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bl-kernel/pagex.class.php b/bl-kernel/pagex.class.php index 08da653b..d7b5cc45 100644 --- a/bl-kernel/pagex.class.php +++ b/bl-kernel/pagex.class.php @@ -122,9 +122,14 @@ class Page { } // Returns the date according to locale settings and format settings - public function dateModified() + public function dateModified($format=false) { - return $this->getValue('dateModified'); + $dateRaw = $this->getValue('dateModified'); + if ($format===false) { + global $site; + $format = $site->dateFormat(); + } + return Date::format($dateRaw, DB_DATE_FORMAT, $format); } // Returns the username who created the page