List of utility methods to do Month
String | getFirstMonthOfQuarter(String quarter) get First Month Of Quarter int qu = Integer.parseInt(quarter); String month = ""; if (qu == 1) { month = "01"; } else if (qu == 2) { month = "04"; } else if (qu == 3) { month = "07"; ... |
int | getFiscalMonth(int month, int fiscalMonthOffset) get Fiscal Month int result = ((month - fiscalMonthOffset - 1) % 12) + 1; if (result < 0) { result += 12; return result; |
String | getFrontMonth(String month) get Front Month int mon = Integer.parseInt(month); String frontmonth = ""; if (mon == 1) { frontmonth = "12"; } else if (mon < 11) { frontmonth = "0" + String.valueOf(mon - 1); } else { frontmonth = String.valueOf(mon - 1); ... |
String | getMonthBegin(String strdate) get Month Begin return strdate;
|
String | getMonthBeginByMonth(String month) get Month Begin By Month return month + "-01"; |
String | getMonthBetween(String strDate, int intDiff) get Month Between try { int intYear = Integer.parseInt(strDate.substring(0, 4)); int intMonth = Integer.parseInt(strDate.substring(4, 6)); String strDay = ""; if (strDate.length() > 6) strDay = strDate.substring(6, strDate.length()); for (intMonth += intDiff; intMonth <= 0; intMonth += 12) intYear--; ... |
String | getMonthByDate(String yyyyMMdd) get Month By Date return yyyyMMdd.substring(0, 6);
|
Integer | getMonthCountByBillMode(String billMode) Description Get month count by bill mode. Integer monthCount = null; if ("Y".equals(billMode) || "A".equals(billMode)) { monthCount = 12; } else if ("S".equals(billMode)) { monthCount = 6; } else if ("Q".equals(billMode)) { monthCount = 3; } else if ("M".equals(billMode)) { ... |
String | getMonthDescription(int month) get Month Description return getMonthDescription(month, 0);
|
int | getMonthDiff(String startDate, String endDate) get Month Diff String[] startArray = startDate.split("-"); String[] endArray = endDate.split("-"); int startYear = Integer.parseInt(startArray[0]); int startMonth = Integer.parseInt(startArray[1]); int endYear = Integer.parseInt(endArray[0]); int endMonth = Integer.parseInt(endArray[1]); return Math.abs((endYear - startYear) * 12 + endMonth - startMonth); |