Example usage for android.text.format Time WEDNESDAY

List of usage examples for android.text.format Time WEDNESDAY

Introduction

In this page you can find the example usage for android.text.format Time WEDNESDAY.

Prototype

int WEDNESDAY

To view the source code for android.text.format Time WEDNESDAY.

Click Source Link

Usage

From source file:Main.java

/**
 * Converts the day of the week from android.text.format.Time to java.util.Calendar
 *///w  ww .ja  v a  2  s.  c om
public static int convertDayOfWeekFromTimeToCalendar(int timeDayOfWeek) {
    switch (timeDayOfWeek) {
    case Time.MONDAY:
        return Calendar.MONDAY;
    case Time.TUESDAY:
        return Calendar.TUESDAY;
    case Time.WEDNESDAY:
        return Calendar.WEDNESDAY;
    case Time.THURSDAY:
        return Calendar.THURSDAY;
    case Time.FRIDAY:
        return Calendar.FRIDAY;
    case Time.SATURDAY:
        return Calendar.SATURDAY;
    case Time.SUNDAY:
        return Calendar.SUNDAY;
    default:
        throw new IllegalArgumentException("Argument must be between Time.SUNDAY and " + "Time.SATURDAY");
    }
}