Example usage for java.time Year atDay

List of usage examples for java.time Year atDay

Introduction

In this page you can find the example usage for java.time Year atDay.

Prototype

public LocalDate atDay(int dayOfYear) 

Source Link

Document

Combines this year with a day-of-year to create a LocalDate .

Usage

From source file:Main.java

public static void main(String[] args) {
    Year y = Year.of(2014);
    LocalDate l = y.atDay(123);
    System.out.println(l);//from ww  w . j av  a  2  s  .c o m

}

From source file:org.silverpeas.core.calendar.CalendarEventOccurrenceGenerationTest.java

private Period in(Year year) {
    return Period.between(year.atDay(1).atStartOfDay().atOffset(ZoneOffset.UTC), year.atMonth(DECEMBER)
            .atEndOfMonth().plusDays(1).atStartOfDay().minusMinutes(1).atOffset(ZoneOffset.UTC));
}