mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Remove references to DateTime class, using SSDatetime instead
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@44139 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
c955c65fce
commit
318b6b50a3
@ -41,14 +41,14 @@ HTML;
|
||||
|
||||
$props = $record->toArray();
|
||||
$props = $props[0]->toMap();
|
||||
$startyear = new DateTime($props['Created']);
|
||||
$startyear = new SSDatetime($props['Created']);
|
||||
$startyear = $startyear->Format('Y');
|
||||
$startmonth = new DateTime($props['Created']);
|
||||
$startmonth = new SSDatetime($props['Created']);
|
||||
$startmonth = $startmonth->Format('m');
|
||||
|
||||
|
||||
if($filter == "day") {
|
||||
$days = new DateTime($props['Created']);
|
||||
$days = new SSDatetime($props['Created']);
|
||||
$days = $days->Format('t');
|
||||
|
||||
$sum = 0;
|
||||
@ -59,7 +59,7 @@ HTML;
|
||||
|
||||
foreach($record as $v) {
|
||||
$props = $v->toMap();
|
||||
$currdate = new DateTime($props['Created']);
|
||||
$currdate = new SSDatetime($props['Created']);
|
||||
$curryear = $currdate->Format('Y');
|
||||
$currmonth = $currdate->Format('m');
|
||||
$currday = $currdate->Format('j');
|
||||
@ -85,7 +85,7 @@ HTML;
|
||||
|
||||
foreach($record as $v) {
|
||||
$props = $v->toMap();
|
||||
$currdate = new DateTime($props['Created']);
|
||||
$currdate = new SSDatetime($props['Created']);
|
||||
$curryear = $currdate->Format('Y');
|
||||
$currmonth = $currdate->Format('m');
|
||||
$currday = $currdate->Format('j');
|
||||
|
Loading…
x
Reference in New Issue
Block a user