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;
        });
    }
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;
        });
    }
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 ; } ) ; }
Set the maximum datetime.

@param string $max Maximum timestamp. This can be any string parsable by
PHP's `strtotime`.
@return Monolyth\Formulaic\Datetime Self
Set the maximum datetime .