code: public static int getDayOfWeek(Date date) {
          Calendar c = Calendar.getInstance();
          c.setTime(date);
          return c.get(Calendar.DAY_OF_WEEK);
      }
docs: Get the day of week of the date
  
  @param date date
  @return day of week of the date