List of utility methods to do Month
long | monthMillis(int year, int monthNum) month Millis if (monthNum == 13) { year += 1; monthNum = 0; monthNum += 1; if (monthNum == 2) { if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0) { return (long) 1000 * 60 * 60 * 24 * 29; ... |
int | monthStringToInteger(String month) Fetches the numerical month value based on the given String representation. if (month.equalsIgnoreCase("Jan") || month.equalsIgnoreCase("January")) { return 0; if (month.equalsIgnoreCase("Feb") || month.equalsIgnoreCase("February")) { return 1; if (month.equalsIgnoreCase("Mar") || month.equalsIgnoreCase("March")) { return 2; ... |
String | MonthText(int iIndex) Month Text String retValue = ""; switch (iIndex) { case 1: retValue = "Enero"; break; case 2: retValue = "Febrero"; break; ... |
int | monthToTerm(int month) Java months are zero-based, January = 0 thru December = 11 int term = (month / 3) + 1; return term; |
String | nextMonth(String s) next Month if (s.length() != 7) return s; else { String ss[] = s.split("-"); String res; int i = Integer.parseInt(ss[0]); i++; if (i < 10) ... |
int | nextMonthIndex(int current, int step) next Month Index return nextCircularIndex(current, step, 12);
|
int | normalizeMonth(final int month) normalize Month if (1 <= month && month <= 12) return month; int modulo = month % 12; if (modulo < 0) return 12 + modulo; return modulo == 0 ? 12 : modulo; |
String | normalizeMonth(String word) normalize Month if (isReserved(word)) return word; if (isMonth(word)) return "*MONTH*"; return word; |
int | paraseMonth(String yearMonth) parase Month String month = yearMonth.substring(4);
return Integer.parseInt(month);
|
String | parseMonth(final int month) Parse month number to string. String monthString = ""; switch (month) { case 0: monthString = "Enero"; break; case 1: monthString = "Febrero"; break; ... |