Filter/Doctrine/Expression/ExpressionBuilder.php
protected function convertToSqlDate($date, $isMax = false)
    {
        if (! $date instanceof \DateTime) {
            return;
        }
        
        $copy = clone $date;

        if ($isMax) {
            $copy->modify('+1 day -1 second');
        }

        return $this->expr()->literal($copy->format(self::SQL_DATE_TIME));
    }
protected function convertToSqlDate($date, $isMax = false)
    {
        if (! $date instanceof \DateTime) {
            return;
        }
        
        $copy = clone $date;

        if ($isMax) {
            $copy->modify('+1 day -1 second');
        }

        return $this->expr()->literal($copy->format(self::SQL_DATE_TIME));
    }
protected function convertToSqlDate ( $ date , $ isMax = false ) { if ( ! $ date instanceof \ DateTime ) { return ; } $ copy = clone $ date ; if ( $ isMax ) { $ copy -> modify ( '+1 day -1 second' ) ; } return $ this -> expr ( ) -> literal ( $ copy -> format ( self :: SQL_DATE_TIME ) ) ; }
Normalize DateTime boundary

@param  DateTime $date
@param  bool     $isMax

@return \Doctrine\ORM\Query\Expr\Literal|string
Normalize DateTime boundary