Android Date Get getWeekOfDate(Date dt)

Here you can find the source of getWeekOfDate(Date dt)


get Week Of Date


Apache License


public static int getWeekOfDate(Date dt) 

Method Source Code

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

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

public class Main {
    public static int getWeekOfDate(Date dt) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(dt);/*from   w ww. ja  va  2 s.c o  m*/
        int w = cal.get(Calendar.DAY_OF_WEEK);
        return w;


  1. getDayofWeekInMonth(String year, String month, String weekOfMonth, String dayOfWeek)
  2. getDaysOfCurMonth()
  3. getDaysOfCurMonth(final String time)
  4. getMonth(Date date)
  5. getTomorrowAtEight()
  6. getYear(Date date)
  7. getDateObj()
  8. getDate(int year, int month, int date, int hourOfDay, int minute, int second)
  9. getCurrentDateYearMonthDateHourMinuteSecond()