Model/User.php
public function setStartDate($startDate)
    {
        if ($startDate instanceof DateTime) {
            $this->startDate = $startDate;
        } else {
            try {
                $this->startDate = new DateTime($startDate);
            } catch (\Exception $e) {
                $this->startDate = null;
            }
        }

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

        return $this;
    }
public function setStartDate ( $ startDate ) { if ( $ startDate instanceof DateTime ) { $ this -> startDate = $ startDate ; } else { try { $ this -> startDate = new DateTime ( $ startDate ) ; } catch ( \ Exception $ e ) { $ this -> startDate = null ; } } return $ this ; }
Sets the "startDate" of the User.

@param DateTime $startDate

@return User
Sets the startDate of the User .