List of utility methods to do Month Get
String | getMonth(Date date) get Month return FormatDate(date, "MM"); |
int | getMonth(Date date) get Month Calendar cal = new GregorianCalendar(); cal.setTime(date); int calendarMonth = cal.get(Calendar.MONTH); return calendarMonthToInt(calendarMonth); |
String | getMonth(Date date) get Month DateFormat df = new SimpleDateFormat("MM"); df.setLenient(false); String month = df.format(date); if (month.startsWith("0")) return month.substring(1); return month; |
int | getMonth(Date date, TimeZone timeZone) get Month if (date == null) throw new IllegalArgumentException("date is required."); if (timeZone == null) timeZone = TimeZone.getDefault(); _fmtMonth.setTimeZone(timeZone); try { return Integer.parseInt(_fmtMonth.format(date)); } catch (NumberFormatException e) { ... |
String | getMonth(Date dt) Get month string for the specified date. SimpleDateFormat sdf = new SimpleDateFormat("MMMM"); StringBuffer sb = new StringBuffer(); sdf.format(dt, sb, new FieldPosition(0)); return sb.toString(); |
String | getMonth(Date theDate) get Month Calendar cal = Calendar.getInstance(); cal.setTime(theDate); int monthNum = cal.get(Calendar.MONTH); return getMonthForInt(monthNum); |
String | getMonth(int i) Returns the name of the month, given an int (January==0) switch (i) { case 0: return "January"; case 1: return "February"; case 2: return "March"; case 3: ... |
int | getMonth(int i) get Month return getCurrentDate().getMonth();
|
String | getMonth(int month) get Month String[] monthnames = new DateFormatSymbols().getMonths(); String strmonth = monthnames[month]; return strmonth; |
String | getMonth(int month) get Month return MONTHS[month];
|