System update (custom date for Steffen)
This commit is contained in:
parent
c04c976595
commit
2d9d7ef311
1 changed files with 18 additions and 6 deletions
|
@ -706,11 +706,11 @@ class YellowPage
|
|||
}
|
||||
|
||||
// Return page meta data as language specific date
|
||||
function getDate($key, $dateFormat = "")
|
||||
function getDate($key, $format = "")
|
||||
{
|
||||
if(!empty($dateFormat))
|
||||
if(!empty($format))
|
||||
{
|
||||
$format = $this->yellow->text->get($dateFormat);
|
||||
$format = $this->yellow->text->get($format);
|
||||
} else {
|
||||
$format = $this->yellow->text->get("dateFormatMedium");
|
||||
}
|
||||
|
@ -718,11 +718,23 @@ class YellowPage
|
|||
}
|
||||
|
||||
// Return page meta data as language specific date, HTML encoded
|
||||
function getDateHtml($key, $dateFormat = "")
|
||||
function getDateHtml($key, $format = "")
|
||||
{
|
||||
return htmlspecialchars($this->getDate($key, $dateFormat));
|
||||
return htmlspecialchars($this->getDate($key, $format));
|
||||
}
|
||||
|
||||
// Return page meta data as custom date
|
||||
function getDateFormatted($key, $format)
|
||||
{
|
||||
return $this->yellow->text->getDateFormatted(strtotime($this->get($key)), $format);
|
||||
}
|
||||
|
||||
// Return page meta data as custom date, HTML encoded
|
||||
function getDateFormattedHtml($key, $format)
|
||||
{
|
||||
return htmlspecialchars($this->getDateFormatted($key, $format));
|
||||
}
|
||||
|
||||
// Return page content, HTML encoded or raw format
|
||||
function getContent($rawFormat = false, $sizeMax = 0)
|
||||
{
|
||||
|
@ -2047,7 +2059,7 @@ class YellowText
|
|||
return $text;
|
||||
}
|
||||
|
||||
// Return human readable date, custom date format
|
||||
// Return human readable date, custom date
|
||||
function getDateFormatted($timestamp, $format)
|
||||
{
|
||||
$dateMonths = preg_split("/\s*,\s*/", $this->get("dateMonths"));
|
||||
|
|
Loading…
Add table
Reference in a new issue