Java Month of Year dayOfYear(int year, int month, int day)

Here you can find the source of dayOfYear(int year, int month, int day)

Description

day Of Year

License

Open Source License

Parameter

Parameter Description
year a parameter
day a parameter

Declaration

public static int dayOfYear(int year, int month, int day) 

Method Source Code

//package com.java2s;

import java.util.Calendar;

public class Main {
    /**/*from  ww w. j  a v a  2  s.co  m*/
     * @param year
     * @param month. Valid values are in [1,12]
     * @param day
     * @return
     */
    public static int dayOfYear(int year, int month, int day) {
        Calendar c = Calendar.getInstance();
        c.set(year, month - 1, day);
        return c.get(c.DAY_OF_YEAR);
    }
}

Related

  1. create(int year, int month, int day)
  2. create(int year, int month, int day, int hour, int minute, int second)
  3. createKey(int instance, int year, int month, int day, int hour, int min, int sec, int milli, String uuid, boolean rolling)
  4. createTimestamp(int year, int month, int day, int hour, int minutes, int seconds)
  5. currentYearMonth()
  6. dayOfYear(int year, int month, int day)
  7. daysInMonth(final int month, final int year)
  8. daysInMonth(final int year, final int month)
  9. daysInMonth(int month, int year)