Java Date Time Java Java API
Class:
java.time.Year
Method:
public LocalDate atDay(int dayOfYear)
This method combines the copy of this year with the specified day-of-year and returns a LocalDate . The valid value of dayOfYear is between 1-365 (or 1-366 for a leap year) inclusively.
Examples
 package com.logicbig.example.year;
import java.time.LocalDate; import java.time.Year;
public class AtDayExample {
public static void main(String... args) { Year y = Year.of(2011); System.out.println(y);
LocalDate d = y.atDay(210); System.out.println(d); } }
Output2011 2011-07-29
|