Java Day of Week getWeek(Date date)

Here you can find the source of getWeek(Date date)

Description

get Week

License

Open Source License

Declaration

public static int getWeek(Date date) 

Method Source Code

//package com.java2s;

import java.util.Calendar;
import java.util.Date;

public class Main {
    public static int getWeek(Date date) {
        return getCalendar(date).get(7);
    }//from ww  w.  jav a  2s.c  o  m

    public static Calendar getCalendar(Date day) {
        Calendar c = Calendar.getInstance();
        if (day != null)
            c.setTime(day);
        return c;
    }
}

Related

  1. getStartDate(int year, int week)
  2. getStartDates(Date baseDate, int weekNum)
  3. getSundayDate(int week, int year)
  4. getSundayOfWeek(Date date)
  5. getThisweekFirst(Date early)
  6. getWeek(Date date)
  7. getWeek(Date dateParam)
  8. getWeek(Date today)
  9. getWeek(java.util.Date date)