List of utility methods to do Day Name
String | dayName(String dayNumber) day Name String dayName = null; switch (new Integer(Integer.parseInt(dayNumber))) { case (0): dayNumber = "Sunday"; case (1): dayNumber = "Monday"; case (2): dayNumber = "Tuesday"; ... |
String | dayName(String dayNumber) Convert day from number to name String dayName = null; switch (Integer.parseInt(dayNumber)) { case (0): dayName = "Sunday"; break; case (1): dayName = "Monday"; break; ... |
String | getCurrentDayName() Get current day name (sunday, ... Calendar cal = new GregorianCalendar(); int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK); switch (dayOfWeek) { case 1: return "sunday"; case 2: return "monday"; case 3: ... |
String | getDayName() Get the full name of the current day Calendar cal = Calendar.getInstance(); int day = cal.get(Calendar.DAY_OF_WEEK); String strDay; switch (day) { case Calendar.SUNDAY: strDay = "Sunday"; break; case Calendar.MONDAY: ... |
String | getDayName(int i) get Day Name String dayname = ""; switch (i) { case Calendar.MONDAY: dayname = "M"; break; case Calendar.TUESDAY: dayname = "T"; break; ... |
String | getDayName(String code) get Day Name int day = Integer.parseInt(code); switch (day) { case Calendar.SUNDAY: return "Sun"; case Calendar.MONDAY: return "Mon"; case Calendar.TUESDAY: return "Tue"; ... |
String | getDayOfWeekName(int dayOfWeek) Returns the day of the week name as a String which corresponds to dayOfWeek. switch (dayOfWeek) { case Calendar.SUNDAY: return "Sunday"; case Calendar.MONDAY: return "Monday"; case Calendar.TUESDAY: return "Tuesday"; case Calendar.WEDNESDAY: ... |
int | parseDayName(String twoLetterDayName) Returns the constant from java.util.Calendar corresponding to the given two-letter day of the week. if (twoLetterDayName.equals("SU")) { return Calendar.SUNDAY; } else if (twoLetterDayName.equals("MO")) { return Calendar.MONDAY; } else if (twoLetterDayName.equals("TU")) { return Calendar.TUESDAY; } else if (twoLetterDayName.equals("WE")) { return Calendar.WEDNESDAY; ... |