So I have this seasons code:
That works for both my sites, and for some reason my friend's 1.3.6 site isn't allowing the code and makes an error across the page. Any idea how I can fix this? It's not accepting the new DateTime() function.
$today = new DateTime();
if(new DateTime() < new DateTime($today->format('Y').'-3-20 00:00:00')) $season = "Winter <img src=''>";
else if (new DateTime() < new DateTime($today->format('Y').'-6-21 00:00:00')) $season = "Spring ";
else if (new DateTime() < new DateTime($today->format('Y').'-9-22 00:00:00')) $season = "Summer <img src=''>";
else if (new DateTime() < new DateTime($today->format('Y').'-12-20 00:00:00')) $season = "Fall <img src=''>";
else $season = "Winter <img src=''>";
$this->moneyBar->add(new Comment("<b id='season'>{$season}</b><br>"));
That works for both my sites, and for some reason my friend's 1.3.6 site isn't allowing the code and makes an error across the page. Any idea how I can fix this? It's not accepting the new DateTime() function.