mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-05 00:59:35 +00:00
[core] feat: improve date rendering in html formatter (#2516)
This commit is contained in:
parent
ac8e94ec56
commit
c87f4631f2
@ -45,13 +45,14 @@ class HtmlFormat extends FormatAbstract {
|
|||||||
$entryTitle = $this->sanitizeHtml(strip_tags($item->getTitle()));
|
$entryTitle = $this->sanitizeHtml(strip_tags($item->getTitle()));
|
||||||
$entryUri = $item->getURI() ?: $uri;
|
$entryUri = $item->getURI() ?: $uri;
|
||||||
|
|
||||||
$entryTimestamp = '';
|
$entryDate = '';
|
||||||
if($item->getTimestamp()) {
|
if($item->getTimestamp()) {
|
||||||
$entryTimestamp = '<time datetime="'
|
|
||||||
. date(DATE_ATOM, $item->getTimestamp())
|
$entryDate = sprintf(
|
||||||
. '">'
|
'<time datetime="%s">%s</time>',
|
||||||
. date(DATE_ATOM, $item->getTimestamp())
|
date('Y-m-d H:i:s', $item->getTimestamp()),
|
||||||
. '</time>';
|
date('Y-m-d H:i:s', $item->getTimestamp())
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$entryContent = '';
|
$entryContent = '';
|
||||||
@ -96,7 +97,7 @@ class HtmlFormat extends FormatAbstract {
|
|||||||
|
|
||||||
<section class="feeditem">
|
<section class="feeditem">
|
||||||
<h2><a class="itemtitle" href="{$entryUri}">{$entryTitle}</a></h2>
|
<h2><a class="itemtitle" href="{$entryUri}">{$entryTitle}</a></h2>
|
||||||
{$entryTimestamp}
|
{$entryDate}
|
||||||
{$entryAuthor}
|
{$entryAuthor}
|
||||||
{$entryContent}
|
{$entryContent}
|
||||||
{$entryEnclosures}
|
{$entryEnclosures}
|
||||||
|
Loading…
Reference in New Issue
Block a user