Example usage for java.time Period minusYears

List of usage examples for java.time Period minusYears

Introduction

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

Prototype

public Period minusYears(long yearsToSubtract) 

Source Link

Document

Returns a copy of this period with the specified years subtracted.

Usage

From source file:Main.java

public static void main(String[] args) {
    Period p = Period.ofMonths(1);

    Period l = p.minusYears(10);
    System.out.println(l);/*w  w w.j  ava2  s  .co  m*/

}