code: private static List<String> getMonthSpan(int startMonth, int endMonth, int year) {
  
          List<String> result = new ArrayList<String>();
          String yearStr = String.valueOf(year);
          for (int i = startMonth; i <= endMonth; i++) {
              String dateStr = yearStr + DATES[i];
              result.add(dateStr);
          }
          return result;
      }
docs: Calculate a span of months in the given year for the optimized date range search.<p>
  
  The result will contain dates formatted like "yyyyMM", for example "200801".<p>
  
  @param startMonth the start month
  @param endMonth the end month
  @param year the year
  
  @return a span of months in the given year for the optimized date range search