Java Week Day isDayOfWeek(int day)

Here you can find the source of isDayOfWeek(int day)

Description

is Day Of Week

License

Apache License

Declaration

public static boolean isDayOfWeek(int day) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Calendar;

public class Main {

    public static boolean isDayOfWeek(int day) {
        Calendar strDate = Calendar.getInstance();
        if ((strDate.get(Calendar.DAY_OF_WEEK) - 1) == day) {
            return true;
        }//from  w ww . j a v  a 2  s . c om
        return false;
    }
}

Related

  1. getWeekdayOfDateTime(String datetime)
  2. getWeekdays(DateFormatSymbols symbols)
  3. getWeekDayStr(int dayInWeek)
  4. getWeekendDays(Locale locale)
  5. getWeekFirstDay(Date date)
  6. isDayOfWeek(String str, int dayOfWeek)
  7. isFirseDayOfCurrentWeek(Date date)
  8. isoDayOfWeek(int javaDayOfWeek)
  9. isWeekday(String dateStr, String format)