core/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/DB2Platform.php 1 location
|
@@ 226-236 (lines=11) @@
|
223 |
|
*/ |
224 |
|
protected function getDateArithmeticIntervalExpression($date, $operator, $interval, $unit) |
225 |
|
{ |
226 |
|
switch ($unit) { |
227 |
|
case DateIntervalUnit::WEEK: |
228 |
|
$interval *= 7; |
229 |
|
$unit = DateIntervalUnit::DAY; |
230 |
|
break; |
231 |
|
|
232 |
|
case DateIntervalUnit::QUARTER: |
233 |
|
$interval *= 3; |
234 |
|
$unit = DateIntervalUnit::MONTH; |
235 |
|
break; |
236 |
|
} |
237 |
|
|
238 |
|
return $date . ' ' . $operator . ' ' . $interval . ' ' . $unit; |
239 |
|
} |
core/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php 1 location
|
@@ 154-164 (lines=11) @@
|
151 |
|
return "DATETIME(" . $date . ",'" . $operator . $interval . " " . $unit . "')"; |
152 |
|
|
153 |
|
default: |
154 |
|
switch ($unit) { |
155 |
|
case DateIntervalUnit::WEEK: |
156 |
|
$interval *= 7; |
157 |
|
$unit = DateIntervalUnit::DAY; |
158 |
|
break; |
159 |
|
|
160 |
|
case DateIntervalUnit::QUARTER: |
161 |
|
$interval *= 3; |
162 |
|
$unit = DateIntervalUnit::MONTH; |
163 |
|
break; |
164 |
|
} |
165 |
|
|
166 |
|
if (! is_numeric($interval)) { |
167 |
|
$interval = "' || " . $interval . " || '"; |