mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
allow injection on date
This commit is contained in:
parent
8a877debf2
commit
4c4afd5b38
@ -106,7 +106,7 @@ class BlogArchiveWidget extends Widget {
|
|||||||
/**
|
/**
|
||||||
* @var BlogPost $post
|
* @var BlogPost $post
|
||||||
*/
|
*/
|
||||||
$date = new Date();
|
$date = Date::create();
|
||||||
$date->setValue($post->PublishDate);
|
$date->setValue($post->PublishDate);
|
||||||
|
|
||||||
if($this->ArchiveType == 'Yearly') {
|
if($this->ArchiveType == 'Yearly') {
|
||||||
|
Loading…
Reference in New Issue
Block a user