Java Week Calculate weeksInYear(int year)

Here you can find the source of weeksInYear(int year)

Description

weeks In Year

License

Apache License

Declaration

public static int weeksInYear(int year) 

Method Source Code

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

import java.util.*;

public class Main {
    public static int weeksInYear(int year) {
        Calendar c = Calendar.getInstance();
        c.set(Calendar.YEAR, year);
        return c.getActualMaximum(Calendar.WEEK_OF_YEAR);
    }/*from   w  w  w .  j  a  va 2 s.  c om*/
}

Related

  1. plusHour(Date date, int plusWeek)
  2. startOfWeek(Date datum)
  3. weekCal(int weekNumber)
  4. weekCount(Date start, Date end)
  5. weekNumber()
  6. weekStart()