Java Month nextMonthIndex(int current, int step)

Here you can find the source of nextMonthIndex(int current, int step)

Description

next Month Index

License

Open Source License

Declaration

private static int nextMonthIndex(int current, int step) 

Method Source Code

//package com.java2s;

public class Main {
    private static int nextMonthIndex(int current, int step) {
        return nextCircularIndex(current, step, 12);
    }/*from w ww . j a  va 2s .co  m*/

    private static int nextCircularIndex(int current, int step, int modulo) {
        current += step;
        if (current < 0) {
            current += modulo;
        }
        return current % modulo;
    }
}

Related

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