Here you can find the source of addMonthString(String yyyymm)
public static String addMonthString(String yyyymm)
//package com.java2s; //License from project: Apache License public class Main { public static String addMonthString(String yyyymm) { String yy = yyyymm.substring(0, 4); String mm = yyyymm.substring(4); int mm_plus_1 = Integer.parseInt(mm); int iYY = Integer.parseInt(yy); mm_plus_1++;//from ww w . ja v a 2s .c om if (mm_plus_1 > 12) { mm_plus_1 = 1; iYY++; } return String.format("%4d%02d", iYY, mm_plus_1); } }