code: public function setMin($min)
      {
          if ($min instanceof DateTime) {
              $this->min = $min;
          } else {
              try {
                  $this->min = new DateTime($min);
              } catch (\Exception $e) {
                  $this->min = null;
              }
          }
  
          return $this;
      }
docs: Sets the "min" of the DateTimeRange.
  
  @param DateTime $min
  
  @return DateTimeRange