Example usage for java.time Year atMonth

List of usage examples for java.time Year atMonth

Introduction

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

Prototype

public YearMonth atMonth(int month) 

Source Link

Document

Combines this year with a month to create a YearMonth .

Usage

From source file:Main.java

public static void main(String[] args) {
    Year y = Year.of(2014);
    YearMonth l = y.atMonth(Month.JANUARY);
    System.out.println(l);/*  ww  w  .  j  av a2  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));
}