title: Calendar day of month Android
body: <p>I choose the starting date (example 31/01/2014) and ending date (example 31/12/2014), I insert a record every month. If I get the next month is February 28th, but then I always get 28 though March, April, etc. ..
  How can I fix? I hope I explained</p>
  
  <pre><code>SimpleDateFormat sdf1 = new SimpleDateFormat( "yyyy-MM-dd" );
  ContentValues cv = new ContentValues();
  
  for(
    int i=0; 
    calendar1.getTime().before(calendar2.getTime()); 
    i++
  ) {
    calendar1.add(Calendar.MONTH, 1);
  
    if (calendar1.getTime().before(calendar2.getTime())) {
      String strDate = sdf1.format(calendar1.getTime());
      cv.put(etableTable.DATE, strDate);  
      db.insert(etableTable.TABLE_NAME, null, cv);
      ...
    }
  }
  </code></pre>