Example usage for java.time OffsetDateTime minusMonths

List of usage examples for java.time OffsetDateTime minusMonths

Introduction

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

Prototype

public OffsetDateTime minusMonths(long months) 

Source Link

Document

Returns a copy of this OffsetDateTime with the specified number of months subtracted.

Usage

From source file:Main.java

public static void main(String[] args) {
    OffsetDateTime o = OffsetDateTime.now();
    OffsetDateTime d = o.minusMonths(120);
    System.out.println(d);//from   w  w w. j  av  a2 s. com
}