Here you can find the source of dayOfYear(int year, int month, int day)
Parameter | Description |
---|---|
year | a parameter |
day | a parameter |
public static int dayOfYear(int year, int month, int day)
//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); } }