List of utility methods to do Month Name Get
Thread | createDaemonThread(Runnable runnable, String threadName) Creates a daemon thread. Thread daemonThread = new Thread(runnable, threadName); daemonThread.setDaemon(true); return daemonThread; |
String | getDutchMonthName(int monthNumber) Return the (Dutch) month name if (monthNumber < 1 || monthNumber > 12) throw new RuntimeException("Invalid month number " + monthNumber + " (must be 1-12)"); return dutchMonthNames[monthNumber - 1]; |
String | getMonth(boolean name) Returns either the name or the month number depending on the name parameter specified. if (mCalendar == null) Init(); if (name) return months[mCalendar.get(Calendar.MONTH)]; else { String retVal = null; int val = mCalendar.get(Calendar.MONTH) + 1; if (val < 10) ... |
int | getMonth(String monthName) Returns the index of month name provided. String[] months = getMonths(); int month = 0; for (int i = 0; i < months.length; i++) { if (monthName.equals(months[i])) { month = i; return month; ... |
int | getMonthByName(String monthName) Get the Month by Name for (int i = 0; i < MONTHS.length; i++) { if (monthName.toLowerCase().equals(MONTHS[i])) { return i; return 0; |
int | getMonthFromMonthName(String name) get Month From Month Name for (int i = 0; i < 12; i++) { if (months[i].equalsIgnoreCase(name)) { return i; return -1; |
String | getMonthName() Get full name of the current month Calendar cal = Calendar.getInstance(); int month = cal.get(Calendar.MONTH); String strMonth; switch (month) { case Calendar.JANUARY: strMonth = "Jan"; break; case Calendar.FEBRUARY: ... |
String | getMonthName(Date date) get Month Name return new SimpleDateFormat("MMMM").format(date); |
String | getMonthName(int index) get Month Name if (index >= 1 && index <= 12) { return monthNames[index - 1]; return ""; |
String | getMonthName(int month, Locale locale) get Month Name DateFormatSymbols dateFormatSymbols = new DateFormatSymbols(locale); return dateFormatSymbols.getMonths()[month]; |