Skip to content

Instantly share code, notes, and snippets.

@josephhinson
Last active September 15, 2015 15:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save josephhinson/c70fcbe15035f0363e87 to your computer and use it in GitHub Desktop.
Save josephhinson/c70fcbe15035f0363e87 to your computer and use it in GitHub Desktop.
Return the current season based on day
<?php
function return_season() {
$day = date('z');
if( $day < 79) $season = 'winter';
elseif( $day < 171) $season = 'spring';
elseif( $day < 265) $season = 'summer';
elseif( $day < 354) $season = 'fall';
else $season = "winter";
return $season;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment