Example usage for java.time YearMonth adjustInto

List of usage examples for java.time YearMonth adjustInto

Introduction

In this page you can find the example usage for java.time YearMonth adjustInto.

Prototype

@Override
public Temporal adjustInto(Temporal temporal) 

Source Link

Document

Adjusts the specified temporal object to have this year-month.

Usage

From source file:Main.java

public static void main(String[] args) {
    YearMonth y = YearMonth.now();
    Temporal s = y.adjustInto(YearMonth.of(1990, Month.JANUARY));
    System.out.println(s);//  w  ww. j  ava  2 s.  com

}