Example usage for java.time Period minusMonths

List of usage examples for java.time Period minusMonths

Introduction

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

Prototype

public Period minusMonths(long monthsToSubtract) 

Source Link

Document

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

Usage

From source file:Main.java

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

    Period l = p.minusMonths(10);
    System.out.println(l);/*from  w  ww.  j av  a  2 s . c o m*/

}