Java Month nextMonth(String s)

Here you can find the source of nextMonth(String s)

Description

next Month

License

Apache License

Declaration

public static String nextMonth(String s) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static String nextMonth(String s) {
        if (s.length() != 7)
            return s;
        else {/*from   w  w  w  .  j a  v  a2s .co m*/
            String ss[] = s.split("-");
            String res;// = ss[0]+"-";
            int i = Integer.parseInt(ss[0]);
            i++;
            if (i < 10)
                res = "0" + i;
            else
                res = i + "";
            res += "-" + ss[1];
            return res;
        }

    }
}

Related

  1. monthLength(int year, int month)
  2. monthMillis(int year, int monthNum)
  3. monthStringToInteger(String month)
  4. MonthText(int iIndex)
  5. monthToTerm(int month)
  6. nextMonthIndex(int current, int step)
  7. normalizeMonth(final int month)
  8. normalizeMonth(String word)
  9. paraseMonth(String yearMonth)