public static function schoolYearAtTime($year = null) {
		static::loadData();
		if (is_null($year)) return static::schoolYear();
		foreach(static::$arrDBCalendar as $sy) {
			//return graduation year of current school year if available
			if($sy['start'] < $year && $sy['end'] > $year) return date('Y',$sy['end']);
			//else - if a school year is found which begins later than now but already in the current calendar year, return the end year
			//-> summer holidays := following school year
			elseif($sy['start'] > $year && date('Y',$sy['start']) == date('Y')) return date('Y',$sy['end']);
		}
		return false;
	}
public static function schoolYearAtTime($year = null) {
		static::loadData();
		if (is_null($year)) return static::schoolYear();
		foreach(static::$arrDBCalendar as $sy) {
			//return graduation year of current school year if available
			if($sy['start'] < $year && $sy['end'] > $year) return date('Y',$sy['end']);
			//else - if a school year is found which begins later than now but already in the current calendar year, return the end year
			//-> summer holidays := following school year
			elseif($sy['start'] > $year && date('Y',$sy['start']) == date('Y')) return date('Y',$sy['end']);
		}
		return false;
	}
public static function schoolYearAtTime ( $ year = null ) { static :: loadData ( ) ; if ( is_null ( $ year ) ) return static :: schoolYear ( ) ; foreach ( static :: $ arrDBCalendar as $ sy ) { //return graduation year of current school year if available if ( $ sy [ 'start' ] < $ year && $ sy [ 'end' ] > $ year ) return date ( 'Y' , $ sy [ 'end' ] ) ; //else - if a school year is found which begins later than now but already in the current calendar year, return the end year //-> summer holidays := following school year elseif ( $ sy [ 'start' ] > $ year && date ( 'Y' , $ sy [ 'start' ] ) == date ( 'Y' ) ) return date ( 'Y' , $ sy [ 'end' ] ) ; } return false ; }
Get graduation year of any school year
@param int $year | unix time of some day in the year
@return int
Get graduation year of any school year