code: private String[] getDays(int year, int month) {
          Calendar cal = Calendar.getInstance();
          cal.set(year, month, 1);
          int dayNum = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
  
          String[] days = new String[dayNum];
          for (int i = 0; i < dayNum; i++) {
              days[i] = String.valueOf(i + 1);
          }
  
          return days;
      }
docs: Get days of a month
  
  @param year value of the year
  @param month value of the month
  @return days array of this month