Java Month of Year getWeek(int year, int month, int day)

Here you can find the source of getWeek(int year, int month, int day)

Description

get Week

License

Open Source License

Declaration

public static int getWeek(int year, int month, int day) throws Exception 

Method Source Code

//package com.java2s;

import java.util.Calendar;

import java.util.GregorianCalendar;

public class Main {

    public static int getWeek(int year, int month, int day) throws Exception {
        Calendar c = new GregorianCalendar();
        c.set(year, month - 1, day);//from  www.  ja v a2  s .  c  o m

        return c.get(Calendar.DAY_OF_WEEK);
    }
}

Related

  1. getThisMonth(int year, int monthIndex)
  2. getTime(int year, int month, int day)
  3. getTimeByYMD(int year, int month, int day)
  4. getTimestamp(int year, int month, int day, int hour, int minute, int second, int millisecond)
  5. getTodayAdd(int year, int month, int day)
  6. getWorkDayNum(int year, int month, int start, int end)
  7. isDefaultHolidays(int year, int month, int day)
  8. isWeekEnd(int year, int month, int day)
  9. Month_Of_Year(String Date, int MonthCase)