Android Week Day Get monthDaysToIntWeekDays(String dayOfMonth)

Here you can find the source of monthDaysToIntWeekDays(String dayOfMonth)

Description

this would give the days in the range of 0-6 0 = Sun and 6= Sat

Declaration

public static int monthDaysToIntWeekDays(String dayOfMonth) 

Method Source Code

//package com.java2s;

public class Main {
    static String[] daysOfWeek = { "Sun", "Mon", "Tue", "Wed", "Thu",
            "Fri", "Sat" };

    /**/*from ww  w  .  ja v a2 s. c  o m*/
      this would give the days in the range of 0-6 0 = Sun and 6= Sat*/
    public static int monthDaysToIntWeekDays(String dayOfMonth) {
        int i;
        for (i = 0; i < daysOfWeek.length; i++) {
            if (dayOfMonth.equals(daysOfWeek[i])) {
                break;
            }
        }
        return i;
    }
}

Related

  1. convertDayOfWeekFromTimeToCalendar(int timeDayOfWeek)
  2. getDayOfWeek(int index)
  3. getNumberOfDayOfWeekInDays(long days, int firstDayOfWeek, int... dayOfWeek)
  4. getShortDaysOfWeekNames()