Example usage for java.time YearMonth withYear

List of usage examples for java.time YearMonth withYear

Introduction

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

Prototype

public YearMonth withYear(int year) 

Source Link

Document

Returns a copy of this YearMonth with the year altered.

Usage

From source file:Main.java

public static void main(String[] args) {
    YearMonth y = YearMonth.now();
    YearMonth s = y.withYear(2013);
    System.out.println(s);/* ww w . j a  v  a  2s .  c o m*/

}