private static boolean isLessThanOneWeek(Date date){
  Calendar calendar=Calendar.getInstance();
  calendar.add(Calendar.DAY_OF_MONTH,-6);
  return date.after(calendar.getTime());
}

private static boolean isLessThanOneWeek ( Date date ) { Calendar calendar = Calendar . getInstance ( ) ; calendar . add ( Calendar . DAY_OF_MONTH , - 6 ) ; return date . after ( calendar . getTime ( ) ) ; }
check if the date is less than 7 days from now
