title: android java, week number of a date is incorrect
body: <p>in my android app I'm working on to get the week number of a provided date. but it doesn't give me the correct week number I'm using following code to get the week number.</p>
  
  <pre><code>String format = "dd-MM-yyyy";
  SimpleDateFormat df = new SimpleDateFormat(format);
  Date date = df.parse(date);
  Calendar cal = Calendar.getInstance();
  cal.setTime(date);
  int week = cal.get(Calendar.WEEK_OF_YEAR);
  </code></pre>
  
  <p>but this not give me what I'm expecting. for instance lets take January 2016.
  <a href="https://i.stack.imgur.com/BYfgV.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BYfgV.jpg" alt="enter image description here"></a></p>
  
  <p>As of <strong>January 2016</strong> as seen from the above <strong>calendar</strong>, days belongs to the week number <strong>1</strong> are only <strong>1st,2nd and 3rd</strong>. and for the week number <strong>2</strong>, relevant days are <strong>4th, 5th, 6th, 7th,8th, 9th and 10th</strong>. then for the week number <strong>3</strong>, relevant days are <strong>11th, 12th, 13th, 14th, 15th, 16th and 17th</strong> and so on. but for the date <strong>12/01/2016</strong> above code gives me week number <strong>2</strong> instead of week number <strong>3</strong>. am I doing something wrong or is this the way the function works normally. how can I meet my goal to get the week number as I mention above.</p>