SimpleDateFormat format = new
SimpleDateFormat(
"yyyy-MM-dd"
);
Calendar c = Calendar.getInstance();
c.setTime(format.parse('20190823'));
int
dayForWeek =
0
;
if
(c.get(Calendar.DAY_OF_WEEK) ==
1
){
dayForWeek =
7
;
}
else
{
dayForWeek = c.get(Calendar.DAY_OF_WEEK) -
1
;
}