android: 08/29 and 08/30 different week_of_year?

74 Views Asked by At

if i try to get the actual week of year like this:

Calendar cal = Calendar.getInstance();
actualWeek = cal.get(Calendar.WEEK_OF_YEAR);

i get 35 for actualWeek

but for

cal.set(2013, 7, 30);
int week = cal.get(Calendar.WEEK_OF_YEAR);

i get 40

and 42 for

cal.set(2013, 8, 18);
int week = cal.get(Calendar.WEEK_OF_YEAR);

what is wrong with my calendar? it should be 35 for 8/29 and 8/30 and 38 for 9/18

0

There are 0 best solutions below