getActiveTimeBetween() static public method

Get segments of a calendar between 2 date
static public getActiveTimeBetween ( $calendars_id, $day, $begin_time, $end_time ) : timestamp
$calendars_id id of the calendar
$day day number
$begin_time begin time to check
$end_time end time to check
return timestamp value
 /**
  * Get days durations including all segments of the current calendar
  *
  * @return end date
  **/
 function getDaysDurations()
 {
     if (!isset($this->fields['id'])) {
         return false;
     }
     $results = array();
     for ($i = 0; $i < 7; $i++) {
         /// Before PHP 5.3 need to be 23:59:59 and not 24:00:00
         $results[$i] = CalendarSegment::getActiveTimeBetween($this->fields['id'], $i, '00:00:00', '23:59:59');
     }
     return $results;
 }
 /**
  * Get days durations including all segments of the current calendar
  *
  * @return end date
  **/
 function getDaysDurations()
 {
     if (!isset($this->fields['id'])) {
         return false;
     }
     $results = array();
     for ($i = 0; $i < 7; $i++) {
         $results[$i] = CalendarSegment::getActiveTimeBetween($this->fields['id'], $i, '00:00:00', '24:00:00');
     }
     return $results;
 }