title: Java get half month number
body: <p>I would to get the number of the half month od the year starting from a date.
  For example, I have 13-Mar-2012, and I have 6 as result.</p>
  
  <p>I've tried with Calendar class, but doesn't work properly:</p>
  
  <pre><code>    Calendar cal = (GregorianCalendar) Calendar.getInstance();
      cal.set(Calendar.DAY_OF_MONTH,13);
      cal.set(Calendar.MONTH, 2);
      cal.set(Calendar.YEAR, 2012);
      int weekNum = cal.get(Calendar.WEEK_OF_YEAR);
      System.out.println("Weeknum:" + ((weekNum/2)));
  </code></pre>
  
  <p>Can anyone help me?</p>