@Override
	public IDatePeriod getIntersection(IDatePeriod otherPeriod)
	{

		DatePeriodIntersectionTypes intersectionType = this.getIntersectionType(otherPeriod);
		IDatePeriod output;
		Calendar start = null;
		Calendar end = null;
		
		
		switch(intersectionType){
		
		case NONE:		
		case OTHER_PERIOD_PRECEDES:			
		case OTHER_PERIOD_FOLLOWS:		
			output = null;
			return output;
		case OTHER_PERIOD_CONTAINS:
			
			start = this.getStartDate();
			end = this.getEndDate();
			break;

		case OTHER_PERIOD_CONTAINED:
			
			start = otherPeriod.getStartDate();
			end = otherPeriod.getEndDate();
			break;
			
		case OTHER_PERIOD_PRO_IN: 
			
			start = otherPeriod.getStartDate();
			end = this.getEndDate();
			break;
			
		case OTHER_PERIOD_PRO_OUT:
			
			start = this.getStartDate();
			end = otherPeriod.getEndDate();
			break;
			
		} // END SWITCH
		
		/*
		 * Set the time component for each of the local variables:
		 */
		int startHour = start.get(Calendar.HOUR_OF_DAY);
		int startMinute = start.get(Calendar.MINUTE);
		int startSecond = start.get(Calendar.SECOND);
		
		int endHour = end.get(Calendar.HOUR_OF_DAY);
		int endMinute = end.get(Calendar.MINUTE);
		int endSecond = end.get(Calendar.SECOND);
		
		try 
		{
			output = new DatePeriod(start, startHour, startMinute, startSecond, end, endHour, endMinute, endSecond);
			return output;
		} 
		catch (DatePeriodPrecedenceException e) 
		{
			e.printStackTrace();
		}
		
		return null;
		
	} // END METHOD getIntersection