Doctrine\DBAL\Platforms\SQLServerPlatform::getDateArithmeticIntervalExpression PHP Method

getDateArithmeticIntervalExpression() protected method

protected getDateArithmeticIntervalExpression ( $date, $operator, $interval, $unit )
    protected function getDateArithmeticIntervalExpression($date, $operator, $interval, $unit)
    {
        $factorClause = '';
        if ('-' === $operator) {
            $factorClause = '-1 * ';
        }
        return 'DATEADD(' . $unit . ', ' . $factorClause . $interval . ', ' . $date . ')';
    }
SQLServerPlatform