List of utility methods to do Month
String | ResolveMonth(String MonthToResolve) Resolve Month if (MonthToResolve.equals("Jan")) return "01"; if (MonthToResolve.equals("Feb")) return "02"; if (MonthToResolve.equals("Mar")) return "03"; if (MonthToResolve.equals("Apr")) return "04"; ... |
int | returnMonth(String month) return Month if (month.toLowerCase().equals("jan")) { return 0; if (month.toLowerCase().equals("feb")) { return 1; if (month.toLowerCase().equals("mar")) { return 2; ... |
int | roundMonthUnits(final int defaultUnitValue) Round number of units to a 'month suitable' format. float unit = defaultUnitValue; while (unit > 144) { unit /= 12; unit = unit >= 12 ? 12 : unit >= 6 ? 6 : unit >= 4 ? 4 : ... |
void | setStatis_month(String year_month) set Statimonth statis_month = year_month.substring(year_month.length() - 2); |
Thread | startDaemonThread(Runnable runnable) start Daemon Thread Thread result = new Thread(runnable); result.setDaemon(true); result.start(); return result; |
int | stringToMonth(String m) string To Month if (m.compareTo("Jan") == 0) return 1; if (m.compareTo("Feb") == 0) return 2; if (m.compareTo("Mar") == 0) return 3; if (m.compareTo("Apr") == 0) return 4; ... |
String | toAnotherMonthColor(String value, String type) to Another Month Color if (type.equals(WEB_VIEW)) return "<td class=\"anotherMonthColor\">" + value + "</td>"; else if (type.equals(CONSOLE_VIEW)) return ANSI_YELLOW + value + ANSI_RESET; else return value; |
int | toCalendarMonth(int month) to Calendar Month return month - 1;
|
int | toMonths(int years, int months) to Months return years * yearsToMonths + months;
|
void | validateMonth(int month) validate Month if (month < 1 || month > 12) { throw new IllegalArgumentException("Invalid month (must be >= 1 and <= 12."); |