code: public void Not()
  	{
  		if( periods == null )
  		{
  			if( days == null ) // // security added to avoid null exception
  				return;
  			for( int i = 0; i < 7; i++ )
  				days.getDay( i ).not();
  			return;
  		}
  
  		List<Period> result = new ArrayList<Period>();
  
  		String curBegin = CalendarFunctions.TIME_BEGIN;
  		for( int i = 0; i < periods.size(); i++ )
  		{
  			Period period = periods.get( i );
  
  			if( (!period.getFrom().equals( CalendarFunctions.TIME_BEGIN )) && (CalendarFunctions.date_add_day( period.getFrom(), -1 ).compareTo( curBegin ) >= 0) )
  				result.add( new Period( curBegin, CalendarFunctions.date_add_day( period.getFrom(), -1 ) ) );
  			curBegin = CalendarFunctions.date_add_day( period.getTo(), 1 );
  		}
  
  		if( CalendarFunctions.TIME_END.compareTo( curBegin ) >= 0 )
  			result.add( new Period( curBegin, CalendarFunctions.TIME_END ) );
  
  		periods = result;
  	}
docs: NOT operator