EntityService/DueService.php
public function getHook($entity, $mode = Hook::MODE_DEFAULT){
        $hook = new Due();

        if(
            is_object($entity) &&
            $entity->getId() !== null
        ){
            if(
                $mode == Hook::MODE_DEFAULT &&
                // Operations have no direct relation to a campaign, so exclude them.
                strpos(get_class($entity), 'CoreBundle\Entity\Operation') === false &&
                // Don't process Campaigns here.
                strpos(get_class($entity), 'CoreBundle\Entity\Campaign') === false &&
                // Check if the Action's campaign has relative dates.
                $entity->getCampaign()->getHasRelativeDates()
            ){
                $interval = $entity->getCampaign()->getStartDate()->diff(
                    $entity->getStartDate()
                );
                $time = $entity->getStartDate()->format('H').':'.$entity->getStartDate()->format('i');
                $days = $interval->format("%a");
                if($time != '00:00'){
                    $days = ++$days;
                }
                $hook->setDays($days);
                $hook->setTime($time);
            }

            $hook->setStartDate($entity->getStartDate());
        }

        return $hook;
    }
public function getHook($entity, $mode = Hook::MODE_DEFAULT){
        $hook = new Due();

        if(
            is_object($entity) &&
            $entity->getId() !== null
        ){
            if(
                $mode == Hook::MODE_DEFAULT &&
                // Operations have no direct relation to a campaign, so exclude them.
                strpos(get_class($entity), 'CoreBundle\Entity\Operation') === false &&
                // Don't process Campaigns here.
                strpos(get_class($entity), 'CoreBundle\Entity\Campaign') === false &&
                // Check if the Action's campaign has relative dates.
                $entity->getCampaign()->getHasRelativeDates()
            ){
                $interval = $entity->getCampaign()->getStartDate()->diff(
                    $entity->getStartDate()
                );
                $time = $entity->getStartDate()->format('H').':'.$entity->getStartDate()->format('i');
                $days = $interval->format("%a");
                if($time != '00:00'){
                    $days = ++$days;
                }
                $hook->setDays($days);
                $hook->setTime($time);
            }

            $hook->setStartDate($entity->getStartDate());
        }

        return $hook;
    }
}