Firstly, this code segment lets you the exact integer number of the current day. Therefore, you can get the switch-case check to do whatever you want on an exact day.
Calendar calendar = Calendar.getInstance();
int day = calendar.get(Calendar.DAY_OF_WEEK);
switch (day){
case Calendar.SUNDAY:
//Your code
break;
case Calendar.MONDAY:
//Your code
break;
...
}
Moreover, this code segment gives you the formatted current date. You can shape your format to change : “yyyy-MM-dd” part.
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
String now = df.format(new Date());