Here you can find the source of getFrontMonth(String month)
public static String getFrontMonth(String month)
//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; } }