Example usage for java.time OffsetDateTime plusMonths

List of usage examples for java.time OffsetDateTime plusMonths

Introduction

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

Prototype

public OffsetDateTime plusMonths(long months) 

Source Link

Document

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

Usage

From source file:Main.java

public static void main(String[] args) {
    OffsetDateTime o = OffsetDateTime.now();
    OffsetDateTime d = o.plusMonths(20);
    System.out.println(d);/*  w ww .  j av  a2 s.  c  o m*/
}