@@ 338-347 (lines=10) @@ | ||
335 | $day = substr($this->iterator->from, 0, 10); |
|
336 | $planned = $entry->getDayPlannedPeriods($day); |
|
337 | ||
338 | if (0 === count($planned)) { |
|
339 | $workingPeriods = $entry->getDayWorkingPeriods($day); |
|
340 | ||
341 | if (0 === count($workingPeriods)) { |
|
342 | return bab_mktime($this->iterator->from); |
|
343 | } |
|
344 | ||
345 | $firstPeriod = reset($workingPeriods); |
|
346 | return $firstPeriod->ts_begin; |
|
347 | } |
|
348 | ||
349 | $firstperiod = reset($planned); |
|
350 | ||
@@ 377-386 (lines=10) @@ | ||
374 | $day = $end->getIsoDate(); |
|
375 | $planned = $entry->getDayPlannedPeriods($day); |
|
376 | ||
377 | if (0 === count($planned)) { |
|
378 | $workingPeriods = $entry->getDayWorkingPeriods($day); |
|
379 | ||
380 | if (0 === count($workingPeriods)) { |
|
381 | return bab_mktime($this->iterator->to); |
|
382 | } |
|
383 | ||
384 | $lastPeriod = end($workingPeriods); |
|
385 | return $lastPeriod->ts_end; |
|
386 | } |
|
387 | ||
388 | $lastperiod = end($planned); |
|
389 |