@@ 257-271 (lines=15) @@ | ||
254 | /** |
|
255 | * @return LocalDate |
|
256 | */ |
|
257 | public function getStartOfPreviousDay() |
|
258 | { |
|
259 | $dateCloned = clone $this->getDate(); |
|
260 | ||
261 | // take switches between summer and winter time into account |
|
262 | if ($dateCloned->format('H') > 21) { |
|
263 | $dateCloned->modify('-27 hours'); |
|
264 | } else { |
|
265 | $dateCloned->modify('-24 hours'); |
|
266 | } |
|
267 | ||
268 | $temp = new LocalDate($dateCloned, $this->timezone); |
|
269 | ||
270 | return $temp->getStartOfDay(); |
|
271 | } |
|
272 | ||
273 | /** |
|
274 | * @return LocalDate |
|
@@ 276-290 (lines=15) @@ | ||
273 | /** |
|
274 | * @return LocalDate |
|
275 | */ |
|
276 | public function getStartOfNextDay() |
|
277 | { |
|
278 | $dateCloned = clone $this->getDate(); |
|
279 | ||
280 | // take switches between summer and winter time into account |
|
281 | if ($dateCloned->format('H') < 3) { |
|
282 | $dateCloned->modify('+27 hours'); |
|
283 | } else { |
|
284 | $dateCloned->modify('+24 hours'); |
|
285 | } |
|
286 | ||
287 | $temp = new LocalDate($dateCloned, $this->timezone); |
|
288 | ||
289 | return $temp->getStartOfDay(); |
|
290 | } |
|
291 | ||
292 | /** |
|
293 | * @return LocalDate |