Calendar.get(DAY_OF_WEEK)
always returns one of CALENDAR.SUNDAY
, Calendar.MONDAY
, ..., Calendar.SATURDAY
, whatever the locale is. And these are constants which are respectively 1, 2, ... 7.
So if your boolean array starts at Monday (index 0) and ends at Sunday (index 6) you just need this:
int calendarDayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
int myDayOfWeek = calendarDayOfWeek - 2;
if (myDayOfWeek < 0) {
myDayOfWeek += 7;
}