Java Date Time Java Java API
java.time.Year
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.
LocalDate
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); }}
20112011-07-29