Java Day of Week getWeekNumOfYear(Date date)

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

Description

get Week Num Of Year

License

Open Source License

Declaration

public static int getWeekNumOfYear(Date date) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

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

public class Main {

    public static int getWeekNumOfYear(Date date) {
        Calendar c = new GregorianCalendar();
        c.setFirstDayOfWeek(Calendar.MONDAY);
        c.setMinimalDaysInFirstWeek(7);/*from   www  .j  a  v a2s.c  o  m*/
        c.setTime(date);
        return c.get(Calendar.WEEK_OF_YEAR);
    }
}

Related

  1. getWeekID(Date dateValue)
  2. getWeekNum(Date date)
  3. getWeekNumber(Date date)
  4. getWeekNumber(Date date, Integer day)
  5. getWeekNumberFromDate(Date date)
  6. getWeekOfDate(Date dt)
  7. getWeekOfDay(Date date)
  8. getWeekOfMonth(Date date)
  9. getWeekOfMonth(final Date date)