title: Month name from Month Numbers in android
body: <p>I have a problem with <strong>converting the month number into month Name</strong> that is if month number 1 or 2 its returning March only. But for 1 it should return Feb right ? Previously i had this same problem for one day but next day it automatically worked i don;t How? But today again its showing like this I need some help to <strong>FIX</strong> it </p>
  
  <pre><code>public static String getMonthShortName(int monthNumber) {
      String monthName = "";
  
      if (monthNumber &gt;= 0 &amp;&amp; monthNumber &lt; 12)
          try {
              Calendar calendar = Calendar.getInstance();
              calendar.set(Calendar.MONTH, monthNumber);
  
              SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MMM");
              //simpleDateFormat.setCalendar(calendar);
              monthName = simpleDateFormat.format(calendar.getTime());
          } catch (Exception e) {
              if (e != null)
                  e.printStackTrace();
          }
      return monthName;
  }
  </code></pre>
  
  <p>if monthNumber 1 or 2 
  in this statement </p>
  
  <pre><code>monthName = simpleDateFormat.format(calendar.getTime());
  </code></pre>
  
  <p>its returning <strong>Mar</strong> (March) only. But for the other numbers its working fine. Can any one of help me out of this ?</p>