code: public void Intersect( CalendarPeriod pPeriod )
  	{
  		if( (days != null) && (pPeriod.getDays() != null) )
  		{
  			for( int i = 0; i < 7; i++ )
  				if( days.getDay( i ).get() + pPeriod.getDays().getDay( i ).get() >= 2 )
  					days.getDay( i ).set();
  				else
  					days.getDay( i ).reset();
  			return;
  		}
  
  		// if one of the two operands is unresolved, it's a good time to resolve
  		// it now
  		List<Period> _periods;
  		CalendarPeriod _toResolve;
  		if( (days != null) || (pPeriod.getDays() != null) )
  		{
  			if( days == null )
  			{
  				_periods = periods;
  				_toResolve = pPeriod;
  			}
  			else
  			{
  				_periods = pPeriod.getPeriods();
  				_toResolve = this;
  			}
  
  			String from = _periods.get( 0 ).getFrom();
  			String to = _periods.get( _periods.size() - 1 ).getTo();
  
  			_toResolve.Resolve( from, to );
  		}
  
  		// echo "Intersect " . $this->Out() . " with " . $period->Out() .
  		// "<br>";
  
  		// intersect the two period list
  		List<Period> result = _Intersect( periods, pPeriod.getPeriods() );
  
  		periods = result;
  	}
docs: AND operator