booked/lib/Application/Schedule/ScheduleReservationList.php
/**
	 * @param Date $endingTime
	 * @return int index of $_layoutItems which has the closest ending time to $endingTime without going past it
	 */
@param Date $endingTime
@return int index of $_layoutItems which has the closest ending time to $endingTime without going past it
@param Date $endingTime @return int index of $_layoutItems which has the closest ending time to $endingTime without going past it
private function FindClosestLayoutIndexBeforeEndingTime(Date $endingTime)
	{
		for ($i = count($this->_layoutItems) - 1; $i >= 0; $i--)
		{
			$currentItem = $this->_layoutItems[$i];
			if ($currentItem->BeginDate()->LessThan($endingTime))
			{
				return $i;
			}
		}
		return 0;
	}
private function FindClosestLayoutIndexBeforeEndingTime ( Date $ endingTime ) { for ( $ i = count ( $ this -> _layoutItems ) - 1 ; $ i >= 0 ; $ i -- ) { $ currentItem = $ this -> _layoutItems [ $ i ] ; if ( $ currentItem -> BeginDate ( ) -> LessThan ( $ endingTime ) ) { return $ i ; } } return 0 ; }
@param Date $endingTime
 @return int index of $_layoutItems which has the closest ending time to $endingTime without going past it
@param Date $endingTime @return int index of $_layoutItems which has the closest ending time to $endingTime without going past it