I have this simple code:
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
Date date = format.parse("2011-10-29");
calendar.setTime(date);
Log.d("Debug","Day of the week = "+(calendar.get(Calendar.DAY_OF_WEEK)==Calendar.SATURDAY));
The 29th of October is a Saturday so why do I get false?
Here is an example of how this could happen…
which outputs
so yes, depending on what time zone you are in it will or will not be Saturday.