Thread: Explore Help?
View Single Post
  #8  
Old 03-29-2017, 11:37 PM
ewe ewe is offline
Member
 
Join Date: Mar 2017
Posts: 8
Gender: Female
Credits: 1,757
ewe is on a distinguished road
Default

Kyttias' posts have helped me immensely but it seems I hate to leave well enough alone.

Here's code for more specific seasons:

PHP Code:
    if(new DateTime() < new DateTime($dateTime->format('Y').'-3-20 00:00:00')) $season 'winter';
    else if (new 
DateTime() < new DateTime($dateTime->format('Y').'-6-21 00:00:00')) $season 'spring';
    else if (new 
DateTime() < new DateTime($dateTime->format('Y').'-9-22 00:00:00')) $season 'summer';
    else if (new 
DateTime() < new DateTime($dateTime->format('Y').'-12-20 00:00:00')) $season 'fall';
    else 
$season 'winter';
$document->add(new Comment("It is {$season}!")); 

Last edited by ewe; 03-29-2017 at 11:51 PM.
Reply With Quote