0

I have this code

Calendar c = Calendar.getInstance();
c.set(Calendar.YEAR, year);
c.set(Calendar.MONTH, month - 1);
c.set(Calendar.DAY_OF_MONTH, 1);

When you get the c.get(Calendar.WEEK_OF_YEAR) it produce different week number

example c.set(2016, Calendar.JANUARY, 1);

one android phone produce c.get(Calendar.WEEK_OF_YEAR) = 1 and the other one is c.get(Calendar.WEEK_OF_YEAR) = 53

smaxi
  • 47
  • 1
  • 6

1 Answers1

0

There are several ways to count the weeks-of-year. This will probably help you: https://stackoverflow.com/a/4608695

Community
  • 1
  • 1
e-shfiyut
  • 3,538
  • 2
  • 30
  • 31
  • tried that already, Its the same, if I follow that the result would be like this in one phone, US = 1 DE = 52, the other is US = 52, DE = 53 – smaxi Mar 04 '16 at 21:46