Merge pull request #563 from shaunjc/sjc/3.0-date-fix

FIX: Update Blog archive date formats for SS4
This commit is contained in:
Guy Marriott 2018-11-26 15:22:18 +13:00 committed by GitHub
commit 17ed46cddd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

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

View File

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