private boolean isConflictWith(long startTime, long endTime, int frequency,
			long lastDay) {

		// day span
		long startDay1 = DateUtil.getStartOfDay(this.startTime);
		long startDay2 = DateUtil.getStartOfDay(startTime);
		long endDay1 = this.lastDay;
		long endDay2 = lastDay;
		if (endDay2 < startDay1 || endDay1 < startDay2)
			return false;

		// frequency
		int freq1 = this.frequency;
		int freq2 = frequency;
		int freqHelper1;
		int freqHelper2;
		if (freq1 == Frequency.WEEKLY || freq2 == Frequency.WEEKLY)
		{
			freqHelper1 =
					Appointment.computeFreqHelper(Frequency.WEEKLY, startDay1);
			freqHelper2 =
					Appointment.computeFreqHelper(Frequency.WEEKLY, startDay2);
			if (freqHelper1 != freqHelper2)
				return false;
		} else if (freq1 == Frequency.MONTHLY || freq2 == Frequency.MONTHLY)
		{
			freqHelper1 =
					Appointment.computeFreqHelper(Frequency.MONTHLY, startDay1);
			freqHelper2 =
					Appointment.computeFreqHelper(Frequency.MONTHLY, startDay2);
			if (freqHelper1 != freqHelper2)
				return false;
		}

		// time
		long startTime1 = DateUtil.transposeToDay(this.startTime, startDay2);
		long endTime1 = DateUtil.transposeToDay(this.endTime, startDay2);
		long startTime2 = startTime;
		long endTime2 = endTime;

		return startTime1 < endTime2 && startTime2 < endTime1;
	}