FIX: Update Blog archive date formats for SS4

This commit is contained in:
Shaun Cockerill 2018-11-26 10:03:29 +08:00
parent fcda48175c
commit c0895803db
2 changed files with 4 additions and 4 deletions

View File

@ -396,9 +396,9 @@ class BlogController extends PageController
if ($this->owner->getArchiveDay()) {
$date = $this->owner->getArchiveDate()->Nice();
} elseif ($this->owner->getArchiveMonth()) {
$date = $this->owner->getArchiveDate()->format('F, Y');
$date = $this->owner->getArchiveDate()->format('MMMM, y');
} else {
$date = $this->owner->getArchiveDate()->format('Y');
$date = $this->owner->getArchiveDate()->format('y');
}
$items[] = _t(

View File

@ -9,9 +9,9 @@
<% if $ArchiveDay %>
$ArchiveDate.Nice
<% else_if $ArchiveMonth %>
$ArchiveDate.format('F, Y')
$ArchiveDate.format('MMMM, y')
<% else %>
$ArchiveDate.format('Y')
$ArchiveDate.format('y')
<% end_if %>
<% else_if $CurrentTag %>
<%t SilverStripe\\Blog\\Model\\Blog.Tag 'Tag' %>: $CurrentTag.Title