So in my android app, the user can add a date as a string of 6 characters YYMMDD. This String I then divide into 3 substrings, year, month, day.
Then I use an instance of calender to check whenever this date is a weekday, saturday or sunday, like this:
Calendar c = Calendar.getInstance();
c.set(year,month,day);
int dayOfWeek = c.get(Calendar.DAY_OF_WEEK) ;
As I have learned, sunday is = 1 and saturday = 7. When I test this these are the results I get: 160517 res=4//it's tuesday, but 4 means wednesday. 160514 res=1//it's saturday but 1 means sunday.