Android Utililty Methods Week Day Get

List of utility methods to do Week Day Get

Description

The list of methods to do Week Day Get are organized into topic(s).

Method

intmonthDaysToIntWeekDays(String dayOfMonth)
this would give the days in the range of 0-6 0 = Sun and 6= Sat
int i;
for (i = 0; i < daysOfWeek.length; i++) {
    if (dayOfMonth.equals(daysOfWeek[i])) {
        break;
return i;
intconvertDayOfWeekFromTimeToCalendar(int timeDayOfWeek)
Converts the day of the week from android.text.format.Time to java.util.Calendar
switch (timeDayOfWeek) {
case Time.MONDAY:
    return Calendar.MONDAY;
case Time.TUESDAY:
    return Calendar.TUESDAY;
case Time.WEDNESDAY:
    return Calendar.WEDNESDAY;
case Time.THURSDAY:
...
StringgetDayOfWeek(int index)
get Day Of Week
final int SUNDAY = 1;
final int MONDAY = 2;
final int TUESDAY = 3;
final int WEDNESDAY = 4;
final int THURSDAY = 5;
final int FRIDAY = 6;
final int SATURDAY = 7;
String day = "";
...
longgetNumberOfDayOfWeekInDays(long days, int firstDayOfWeek, int... dayOfWeek)
get Number Of Day Of Week In Days
if (dayOfWeek == null)
    return 0;
if (dayOfWeek.length == 7)
    return days;
long count = 0;
long weeks = days / 7;
long offset = days % 7;
if (offset > 0) {
...
String[]getShortDaysOfWeekNames()
get Short Days Of Week Names
return getDaysOfWeekNames(Locale.getDefault(), SHORT);