예제 #1
0
 /**
  * It can show if two timeslot overlap each other.
  *
  * @param TimeSlot $first
  * @param TimeSlot $second
  *
  * @return boolean
  */
 public static function isOverlap(TimeSlot $first, TimeSlot $second)
 {
     return !($first->getStartDate() > $second->getEndDate()) && !($first->getEndDate() < $second->getStartDate());
 }
예제 #2
0
        return $endTime;
    }
    function dateAIsBeforeDateB($dateA, $dateB)
    {
    }
    function dateAIsAfterDateB($dateA, $dateB)
    {
    }
    function dateAEqualsDateB($dateA, $dateB)
    {
    }
    function thisTimeslotIsBeforeOther($other)
    {
        return dateAIsBeforeDateB(getEndTime(), other . getStartTime());
    }
    function thisTimeslotIsAfterOther($other)
    {
        return dateAIsAfterDateB(getStartTime(), other . getEndTime());
    }
}
function isTimeslotABeforeTimeslotB($a, $b)
{
}
function isTimeslotAAfterTimeslotB($a, $b)
{
}
$a = new TimeSlot();
$b = 1;
$c = 2;
$a->setTimes($b, $b);
echo $a->getStartTime();