lib/Elastica/Aggregation/DateHistogram.php
public function setExtendedBounds(string $min = '', string $max = ''): self
    {
        $bounds = [];
        $bounds['min'] = $min;
        $bounds['max'] = $max;
        // switch if min is higher then max
        if (\strtotime($min) > \strtotime($max)) {
            $bounds['min'] = $max;
            $bounds['max'] = $min;
        }

        return $this->setParam('extended_bounds', $bounds);
    }
public function setExtendedBounds(string $min = '', string $max = ''): self
    {
        $bounds = [];
        $bounds['min'] = $min;
        $bounds['max'] = $max;
        // switch if min is higher then max
        if (\strtotime($min) > \strtotime($max)) {
            $bounds['min'] = $max;
            $bounds['max'] = $min;
        }

        return $this->setParam('extended_bounds', $bounds);
    }
public function setExtendedBounds ( string $ min = '' , string $ max = '' ) : self { $ bounds = [ ] ; $ bounds [ 'min' ] = $ min ; $ bounds [ 'max' ] = $ max ; // switch if min is higher then max if ( \ strtotime ( $ min ) > \ strtotime ( $ max ) ) { $ bounds [ 'min' ] = $ max ; $ bounds [ 'max' ] = $ min ; } return $ this -> setParam ( 'extended_bounds' , $ bounds ) ; }
Set extended bounds option.

@see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-histogram-aggregation.html#search-aggregations-bucket-histogram-aggregation-extended-bounds

@param string $min see link for formatting options
@param string $max see link for formatting options

@return $this
Set extended bounds option .