Quick Search:
 
 PHP Code: Show the current season (spring, summer, fall, winter) Jump to:  
Category: >> PHP Code >> Show the current season (spring, summer, fall, winter)  

<< lastnext >>

Snippet Name: Show the current season (spring, summer, fall, winter)

Description: Returns the current season (spring, summer, fall, winter)

Also see:
» Show the current season (spring, summe...
» What Season Is It?

Comment: (none)

Language: PHP
Highlight Mode: PHP
Last Modified: March 16th, 2009

//get current month
$currentMonth=DATE("m");
 
//retrieve season
IF ($currentMonth>="03" && $currentMonth<="05")
  $season = "spring";
ELSEIF ($currentMonth>="06" && $currentMonth<="08")
  $season = "summer";
ELSEIF ($currentMonth>="09" && $currentMonth<="11")
  $season = "fall";
ELSE
  $season = "winter";


 
   Home |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us © 2003 - 2024 psoug.org