public function setDateRange($dateRange)
    {
        if ($dateRange instanceof DateTimeRange) {
            $this->dateRange = $dateRange;
        } elseif (is_array($dateRange)) {
            $this->dateRange = new DateTimeRange($dateRange);
        } else {
            $this->dateRange = null;
            trigger_error('Argument must be an object of class DateTimeRange. Data loss!', E_USER_WARNING);
        }

        return $this;
    }