code: public static int getWeekdayOfDate(String date) {
  		SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
  		int weekday = 0;
  		Calendar c = Calendar.getInstance();
  		try {
  			c.setTime(formatter.parse(date));
  			weekday = c.get(Calendar.DAY_OF_WEEK);
  		} catch (ParseException e) {
  			e.printStackTrace();
  		}
  		return weekday;
  	}
docs: Get the weekday of date
  
  @param date current date
  @return day of week