Java Day of Week getDayOfWeek(int _year, int _month, int _day)

Here you can find the source of getDayOfWeek(int _year, int _month, int _day)

Description

get Day Of Week

License

Open Source License

Declaration

public static int getDayOfWeek(int _year, int _month, int _day) 

Method Source Code


//package com.java2s;
import java.util.Calendar;

public class Main {
    public static int getDayOfWeek(int _year, int _month, int _day) {
        int year, month, date;

        Calendar cal = Calendar.getInstance();
        cal.set(_year, _month - 1, _day);

        return cal.get(Calendar.DAY_OF_WEEK);
    }/*from   www  . j a  va  2  s.co  m*/
}

Related

  1. getDateWeek(String date)
  2. getDay(long date, int startOfWeek, int increment)
  3. getDayAfterGivenDate(Date date, int dayOfWeek)
  4. getDayOfWeek()
  5. getDayOfWeek(Date date)
  6. getDayOfWeek(int year, int month, int day)
  7. getDayOfWeek(int year, int month, int day)
  8. getDayOfWeek(String date, String pattern)
  9. getDayOfWeek(String datetime)