src/DateRange.php
public function getTimeperiod()
    {
        foreach (array_keys(self::$time_periods) as $time_period) {
            if (!is_null($this->spans($time_period))) {
                return $time_period;
            }
        }

        return;
    }
public function getTimeperiod()
    {
        foreach (array_keys(self::$time_periods) as $time_period) {
            if (!is_null($this->spans($time_period))) {
                return $time_period;
            }
        }

        return;
    }
public function getTimeperiod ( ) { foreach ( array_keys ( self :: $ time_periods ) as $ time_period ) { if ( ! is_null ( $ this -> spans ( $ time_period ) ) ) { return $ time_period ; } } return ; }
Determines the time period that a date range spans.

@return string|null A string which corresponds to a class constant time period
or null if the date range does not match any supported time spans.
Determines the time period that a date range spans .