Set the maximum datetime.

@param string $max Maximum timestamp. This can be any string parsable by
PHP's `strtotime`.
@return Monolyth\Formulaic\Datetime Self
332395
public function setMax(string $max) : Datetime
    {
        $max = date($this->format, strtotime($max));
        $this->attributes['max'] = $max;
        return $this->addTest('max', function ($value) use ($max) {
            return $value <= $max;
        });
    }
256268
public function setMax($max)
    {
        if (!is_int($max)) {
            throw new \InvalidArgumentException('The attribute max on the class Attribute has to be integer (' . gettype($max) . ('object' === gettype($max) ? ' ' . get_class($max) : '') . ' given).');
        }

        $this->max = $max;

        return $this;
    }
911253
public function setMaxAttemptsPerDay($maxAttemptsPerDay)
    {
        if ($maxAttemptsPerDay > $this->maxAttempts) {
            //we can't try more times per day than the maximum allowed attempts defined
            $this->maxAttemptsPerDay = $this->maxAttempts;
        }

        $this->maxAttemptsPerDay = $maxAttemptsPerDay;
    }
1195605
public static function setTime($newLimit = 0)
    {
        $newLimit = (int)$newLimit;

        self::iniSet('set_time_limit', $newLimit);
        self::iniSet('max_execution_time', $newLimit);
        if (self::isFunc('set_time_limit')) {
            set_time_limit($newLimit);
        }
    }
1247210
public function setDate(\DateTime $date): self
    {
        $date->setTimezone(new \DateTimeZone('UTC'));
        $this->header->set('Date', $date->format('D, d M Y H:i:s') . ' GMT');

        return $this;
    }
1189151
public function setLastModified(\DateTime $date = null): self
    {
        if (null === $date) {
            $this->header->remove('Last-Modified');
        } else {
            $date = clone $date;
            $date->setTimezone(new \DateTimeZone('UTC'));
            $this->header->set('Last-Modified', $date->format('D, d M Y H:i:s') . ' GMT');
        }

        return $this;
    }
203691
public function setMax($max)
    {
        if (null === $max) {
            $this->_max = null;
        } else if ($max < $this->_min) {
            /**
             * @see Zend_Validate_Exception
             */
            include_once 'Zend/Validate/Exception.php';
            throw new Zend_Validate_Exception(
                "The maximum must be greater than or equal to the minimum length, but "
                . "$max < $this->_min"
            );
        } else {
            $this->_max = (integer) $max;
        }

        return $this;
    }
257801
public function max(Date $dt = null)
    {
        $dt = $dt ?: static::now($this->getTimezone());

        return $this->isAfter($dt) ? clone $this : clone $dt;
    }
590748
public function setMax(int $max): void{
        if($this->min > $max){
            throw new \InvalidArgumentException();
        }

        $this->max  = $max;
    }
831237
public function setMax($v)
    {
        if ($v !== null) {
            $v = (double) $v;
        }

        if ($this->max !== $v) {
            $this->max = $v;
            $this->modifiedColumns[AttributeTypeTableMap::MAX] = true;
        }


        return $this;
    }
608126
public function setMaxAge(int $maxAge): StreamMetadataBuilder
    {
        if ($maxAge < 0) {
            throw new InvalidArgumentException('Max age must be positive');
        }

        $this->maxAge = $maxAge;

        return $this;
    }
541159
public Date setMaxSelectableDate(Date max) {
		if (max == null) {
			maxSelectableDate = defaultMaxSelectableDate;
		} else {
			maxSelectableDate = max;
		}
		return maxSelectableDate;
	}
970346
public function setMaximum($maximum)
    {
        if (!\in_array($this->type, [self::TYPE_INTEGER, self::TYPE_NUMBER], true)) {
            throw new \Exception('maximum can only be set on type "integer" or "number');
        }

        $this->maximum = (int) $maximum;
    }
1298564
public function setMaxCol($value)
    {
        if ($value != null) {
            $this->_params['max-col'] = $value;
        } else {
            unset($this->_params['max-col']);
        }
        return $this;
    }
334164
public function setMax($max)
    {
        if (is_array($max) and isset($max['max'])) {
            $max = $max['max'];
        }

        if (!is_string($max) and !is_numeric($max)) {
            // require_once 'Zend/Validate/Exception.php';
            throw new Zend_Validate_Exception ('Invalid options to validator provided');
        }

        $max = (integer) $max;
        if (($this->_min !== null) && ($max < $this->_min)) {
            // require_once 'Zend/Validate/Exception.php';
            throw new Zend_Validate_Exception("The maximum must be greater than or equal to the minimum file count, but "
                                            . "$max < {$this->_min}");
        }

        $this->_max = $max;
        return $this;
    }
372851
public function withExpires(DateTime $date)
    {
        $timezone = new DateTimeZone("PRC");

        $this->withoutHeader('Expires');
        $date->setTimezone($timezone);
        $this->withHeader('Expires', $date->format('D, d M Y H:i:s') . ' GMT');

        $maxAge = $date->getTimestamp() - (new DateTime('now', $timezone))->getTimestamp();
        $this->withMaxAge($maxAge);

        return $this;
    }
99596
protected function setMaxTokens(?int $maxTokens): self
    {
        assert($maxTokens === null || $maxTokens > 0);

        $this->maxTokens = $maxTokens > 0 ? $maxTokens : null;

        return $this;
    }