public static boolean isDateInRange(final Date dateToCheck,final Date startDate,final Date endDate){
  return !((startDate != null && dateToCheck.before(startDate)) || (endDate != null && dateToCheck.after(endDate)));
}

public static boolean isDateInRange ( final Date dateToCheck , final Date startDate , final Date endDate ) { return ! ( ( startDate != null && dateToCheck . before ( startDate ) ) || ( endDate != null && dateToCheck . after ( endDate ) ) ) ; }
returns weather the date is within a given range .
