Example usage for java.time YearMonth minusYears

List of usage examples for java.time YearMonth minusYears

Introduction

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

Prototype

public YearMonth minusYears(long yearsToSubtract) 

Source Link

Document

Returns a copy of this YearMonth with the specified number of years subtracted.

Usage

From source file:Main.java

public static void main(String[] args) {
    YearMonth y = YearMonth.now();
    YearMonth s = y.minusYears(12);
    System.out.println(s);/*www. j av  a2 s. c o  m*/

}