title: Java Code Date Parsing In Android ParseException
body: <p>I need to parse date given in this format , Tested on Marshmallow on Nexus 5.</p>
  
  <pre><code>Nov 5, 2015, 03.44PM IST
  </code></pre>
  
  <p>I parsed it with Java SimpleDateFormat</p>
  
  <pre><code>import java.text.ParseException;
  import java.text.SimpleDateFormat;
  import java.util.Calendar;
  import java.util.Date;
  import java.util.TimeZone;
  
  public class Star {
  
  public static void main(String[] args) {
  
      SimpleDateFormat format = new SimpleDateFormat("MMM dd, yyyy, hh.mma z");
  
      Date today= new Date();
  
      Date date=null;
      try {
          date = format.parse("Nov 5, 2015, 03.44PM IST");
  
          Calendar calendarToday =Calendar.getInstance();
          calendarToday.setTime(today);
  
          Calendar calendar =Calendar.getInstance();
          calendar.setTime(date);
  
  
  
          System.out.println(compareIgnoreTime(calendarToday,calendar));
  
  
      } catch (ParseException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
  }
  public static int compareIgnoreTime(Calendar c1, Calendar c2) {
      if (c1.get(Calendar.YEAR) != c2.get(Calendar.YEAR))
          return c1.get(Calendar.YEAR) - c2.get(Calendar.YEAR);
      if (c1.get(Calendar.MONTH) != c2.get(Calendar.MONTH))
          return c1.get(Calendar.MONTH) - c2.get(Calendar.MONTH);
      return c1.get(Calendar.DAY_OF_MONTH) - c2.get(Calendar.DAY_OF_MONTH);
  }
  }
  </code></pre>
  
  <p>Though this method throwing in Android Only</p>
  
  <pre><code>java.text.ParseException: Unparseable date: "Nov 5, 2015, 03.44PM IST" (at offset 22)
  </code></pre>