List of utility methods to do Month
String | lookupMonthStr(int month) lookup Month Str return (month < 0 || month > MONTHS_STR.length) ? null : MONTHS_STR[month];
|
int | maxLengthOfMonth(int month) max Length Of Month switch (month) { case 2: return 29; case 4: case 6: case 9: case 11: return 30; ... |
long | MONTH(int mh) MONTH return mh * 30 * 24 * 60 * 60 * 1000;
|
int | month2int(String month) Parse a String and determine if it is a month. int result = 0; if (month != null) { if (month.equalsIgnoreCase("january")) { result = 0; } else if (month.equalsIgnoreCase("february")) { result = 1; } else if (month.equalsIgnoreCase("march")) { result = 2; ... |
int | month2second(int month) monthsecond return month * 30 * 24 * 3600;
|
String | month2String(int month) Examine an int and determine if it is a month. String result = "January"; if (month == 0) { result = "January"; } else if (month == 1) { result = "February"; } else if (month == 2) { result = "March"; } else if (month == 3) { ... |
String | monthAlphaToNum(String str) Month string to number str = str.toLowerCase(); if (str.equals("jan") || str.equals("january")) { return "01"; } else if (str.equals("feb") || str.equals("february")) { return "02"; } else if (str.equals("mar") || str.equals("march")) { return "03"; } else if (str.equals("apr") || str.equals("april")) { ... |
int | monthDiff(String beforeTime, String endTime) month Diff if (beforeTime == null || endTime == null) { return 0; int beforeYear, endYear, beforeMonth, endMonth; try { beforeYear = Integer.parseInt(beforeTime.substring(0, 4)); endYear = Integer.parseInt(endTime.substring(0, 4)); beforeMonth = Integer.parseInt(beforeTime.substring(5, 7)) - 1; ... |
int | monthFromDateValue(long x) Get the month from a date value. return (int) (x >>> SHIFT_MONTH) & 15; |
int | monthLength(int year, int month) count of days in the given month (one indexed) of the given year. switch (month) { case 1: case 3: case 5: case 7: case 8: case 10: case 12: ... |