Exemplo n.º 1
0
 private function mergeDateRanges(\UR\DB\NewBundle\Utils\DateRange $dataMasterDateRange, \UR\DB\NewBundle\Utils\DateRange $toBeDeletedDateRange)
 {
     $dataMasterDateRange->setFrom($this->mergeDateObjects($dataMasterDateRange->getFrom(), $toBeDeletedDateRange->getFrom()));
     $dataMasterDateRange->setTo($this->mergeDateObjects($dataMasterDateRange->getTo(), $toBeDeletedDateRange->getTo()));
 }
Exemplo n.º 2
0
 public function matchingDateRanges(\UR\DB\NewBundle\Utils\DateRange $dateRangeOne, \UR\DB\NewBundle\Utils\DateRange $dateRangeTwo, $allowLessInformation = false)
 {
     $this->LOGGER->debug("Comparing '" . $dateRangeOne . "' with '" . $dateRangeTwo . "'");
     if ($this->matchingDates($dateRangeOne->getFrom(), $dateRangeTwo->getFrom(), $allowLessInformation)) {
         return false;
     }
     if ($this->matchingDates($dateRangeOne->getTo(), $dateRangeTwo->getTo(), $allowLessInformation)) {
         return false;
     }
     $this->LOGGER->debug("DateRanges are matching");
     return true;
 }