protected function _initStatus() { $today = DateHelper::now(); if ($today >= $this->_dateStart && $today <= $this->_dateEnd) { $this->_status = self::STATUS_CURRENT; $this->_daysElapsed = DateHelper::now()->format('d'); $this->_daysLeft = $this->getDaysCount() - $this->_daysElapsed; } else { if ($today < $this->_dateStart) { $this->_status = self::STATUS_FUTURE; $this->_daysElapsed = 0; $this->_daysLeft = $this->getDaysCount(); } else { $this->_status = self::STATUS_PAST; $this->_daysElapsed = $this->_dateEnd->format('d'); $this->_daysLeft = 0; } } }