Java Month getFrontMonth(String month)

Here you can find the source of getFrontMonth(String month)

Description

get Front Month

License

Open Source License

Declaration

public static String getFrontMonth(String month) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {

    public static String getFrontMonth(String month) {
        int mon = Integer.parseInt(month);
        String frontmonth = "";
        if (mon == 1) {
            frontmonth = "12";
        } else if (mon < 11) {
            frontmonth = "0" + String.valueOf(mon - 1);
        } else {//from w  w  w. j av  a 2  s.c o  m
            frontmonth = String.valueOf(mon - 1);
        }
        return frontmonth;
    }
}

Related

  1. getEnligthMonth(String en)
  2. getEnMonth(String month)
  3. getFirstMonthByQuarter(int month)
  4. getFirstMonthOfQuarter(String quarter)
  5. getFiscalMonth(int month, int fiscalMonthOffset)
  6. getMonthBegin(String strdate)
  7. getMonthBeginByMonth(String month)
  8. getMonthBetween(String strDate, int intDiff)
  9. getMonthByDate(String yyyyMMdd)