code: public function setDateTime(string $key, $value, string $format, string $ignoredDefaultValue = null)
      {
          if ($value instanceof DateTime) {
              $this->set($key, $value->format($format), $ignoredDefaultValue);
          }
          return $this;
      }
docs: Sets a date and time value to the builder.
  @param string $key
  @param mixed $value
  @param string $format
  @param string|null $ignoredDefaultValue
  @return $this