public function setEndDate($endDate)
    {
        if ($endDate instanceof DateTime) {
            $this->endDate = $endDate;
        } else {
            try {
                $this->endDate = new DateTime($endDate);
            } catch (\Exception $e) {
                $this->endDate = null;
            }
        }

        return $this;
    }