Android Utililty Methods Day of Week Get

List of utility methods to do Day of Week Get

Description

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

Method

StringgetDayOfWeek(String format, int calendarField)
get Day Of Week
String strDate = null;
try {
    Calendar c = new GregorianCalendar();
    SimpleDateFormat mSimpleDateFormat = new SimpleDateFormat(
            format);
    int week = c.get(Calendar.DAY_OF_WEEK);
    if (week == calendarField) {
        strDate = mSimpleDateFormat.format(c.getTime());
...
StringgetDayOfWeek(String format, int calendarField)
get Day Of Week
String strDate = null;
try {
    Calendar c = new GregorianCalendar();
    SimpleDateFormat mSimpleDateFormat = new SimpleDateFormat(
            format);
    int week = c.get(Calendar.DAY_OF_WEEK);
    if (week == calendarField) {
        strDate = mSimpleDateFormat.format(c.getTime());
...
StringgetFirstDayOfWeek(String format)
get First Day Of Week
return getDayOfWeek(format, Calendar.MONDAY);
StringgetFirstDayOfWeek(String format)
get First Day Of Week
return getDayOfWeek(format, Calendar.MONDAY);
StringgetLastDayOfWeek(String format)
get Last Day Of Week
return getDayOfWeek(format, Calendar.SUNDAY);
StringgetLastDayOfWeek(String format)
get Last Day Of Week
return getDayOfWeek(format, Calendar.SUNDAY);
intgetCurrentDayOfWeek()
get Current Day Of Week
Calendar calendar = Calendar.getInstance();
int weekday = calendar.get(Calendar.DAY_OF_WEEK);
return weekday;
intgetFirstDayOfWeek(Context context)
Get mFirst day of week as android.text.format.Time constant.
return Time.MONDAY;
intgetFirstDayOfWeekAsCalendar(Context context)
Get mFirst day of week as java.util.Calendar constant.
return convertDayOfWeekFromTimeToCalendar(getFirstDayOfWeek(context));