public boolean includesDate(Calendar cal) {
int dow = cal.get(Calendar.DAY_OF_WEEK);
if (dow == this.start || dow == this.end) {
return true;
}
Calendar compareCal = (Calendar) cal.clone();
while (compareCal.get(Calendar.DAY_OF_WEEK) != this.start) {
compareCal.add(Calendar.DAY_OF_MONTH, 1);
}
while (compareCal.get(Calendar.DAY_OF_WEEK) != this.end) {
if (compareCal.get(Calendar.DAY_OF_WEEK) == dow) {
return true;
}
compareCal.add(Calendar.DAY_OF_MONTH, 1);
}
return false;
}