Java Year daysInYear(int year)

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

Description

days In Year

License

Apache License

Declaration

public static int daysInYear(int year) 

Method Source Code

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

import java.util.*;

public class Main {
    public static int daysInYear(int year) {
        Calendar c = Calendar.getInstance();
        c.set(Calendar.YEAR, year);
        return c.getActualMaximum(Calendar.DAY_OF_YEAR);
    }//from w ww  .j a  v  a 2  s  . c o m
}

Related

  1. createCalendarAtBeginningOfYear(int year)
  2. currentYear()
  3. differenceInYears(final Calendar a, final Calendar b)
  4. diffYears(Date day1, Date day2)
  5. IsInLeapYear(Date date1)
  6. isLeapYear(int year)