I kind of disagree :
[php]<?php
class Seasons {
/* 2014 to 2020 for more go to http://www.neoprogrammics.com/sun/Solstices_and_Equinoxes_1600_to_2400.php */
protected static $bookingDayFormat;
protected $season = [‘Spring Starts’ => [‘2014-03-20’, ‘2015-03-20’, ‘2016-03-20’, ‘2017-03-20’, ‘2018-03-20’, ‘2019-03-20’, ‘2020-03-20’],
‘Summer Starts’ => [‘2014-06-20’, ‘2015-06-21’, ‘2016-06-20’, ‘2017-06-21’, ‘2018-06-21’, ‘2019-06-21’, ‘2020-06-20’],
‘Fall Starts’ => [‘2014-09-23’, ‘2015-09-23’, ‘2016-09-22’, ‘2017-09-22’, ‘2018-09-23’, ‘2019-09-23’, ‘2020-09-22’],
‘Winter Starts’ => [‘2014-12-21’, ‘2015-12-22’, ‘2016-12-21’, ‘2017-12-21’, ‘2018-12-21’, ‘2019-12-22’, ‘2020-12-21’]];
protected $date;
public $retrieveSeason;
public function __construct($checkSeason, $date = NULL) {
$this->retrieveSeason = $this->getSeason($checkSeason, $date);
}
public static function bookingDate($date) {
return self::$bookingDayFormat = date(“Y-m-d”, strtotime($date));
}
protected function getSeason($checkSeason, $date = NULL) {
$this->date = self::bookingDate($date);
$this->date = is_null($this->date) ? date(‘Y-m-d’) : $this->date;
foreach ($this->$checkSeason as $key => $value) {
if (in_array($this->date, $value)) {
return $key;
}
}
return false;
}
}
$season = new Seasons(‘season’, “2014-12-21”);
echo $season->retrieveSeason;
[/php]
Now I modified this script, but if you needed both hemispheres it would be more practical to use variable variables. 