code: 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;
      }
docs: Sets the "startDate" of the User.
  
  @param DateTime $startDate
  
  @return User