List of utility methods to do Month String Get
String | getCurMonthStr() get Cur Month Str Calendar cal = Calendar.getInstance(); int year = cal.get(Calendar.YEAR); int month = cal.get(Calendar.MONTH) + 1; return getDate(year, month); |
String | getLastMonthStr() get Last Month Str Calendar cal = Calendar.getInstance(); int year = cal.get(Calendar.YEAR); int month = cal.get(Calendar.MONTH) + 1; if (--month == 0) { month = 12; year--; return getDate(year, month); ... |
String | getMonthBefore(String format) get Month Before SimpleDateFormat sdf = new SimpleDateFormat(format); Calendar c = Calendar.getInstance(); c.setTime(new Date()); c.add(Calendar.MONTH, -1); return sdf.format(c.getTime()); |
String | getMonthString(int month, int abbrev) Return a localized string for the month of the year. int[] list; switch (abbrev) { case LENGTH_LONG: list = sMonthsLong; break; case LENGTH_MEDIUM: list = sMonthsMedium; break; ... |
String | getMonthStringByIndex(int index) get Month String By Index switch (index) { case 1: return "Jan"; case 2: return "Feb"; case 3: return "Mar"; case 4: ... |
String | getReadableMonth(int month) get Readable Month return MONTH[month - 1];
|
String | getCurrentMonth() get Current Month return getFormatCurrentTime("MM"); |
String[] | getMonthNames() get Month Names return getMonthNames(Locale.getDefault(), LONG);
|
String[] | getMonthNames(Locale l, int len) get Month Names String[] s; if (len == SHORT) s = new DateFormatSymbols(l).getShortMonths(); else s = new DateFormatSymbols(l).getMonths(); return s; |
String[] | getShortMonths() get Short Months return getMonthNames(Locale.getDefault(), SHORT);
|