Improve date modified returns

This commit is contained in:
Diego Najar 2019-11-18 20:18:29 +01:00
parent 8b025ebe81
commit b510c59bab
1 changed files with 7 additions and 2 deletions

View File

@ -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