Example usage for java.time ZonedDateTime minusMonths

List of usage examples for java.time ZonedDateTime minusMonths

Introduction

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

Prototype

public ZonedDateTime minusMonths(long months) 

Source Link

Document

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

Usage

From source file:Main.java

public static void main(String[] args) {
    ZonedDateTime dateTime = ZonedDateTime.now();
    ZonedDateTime n = dateTime.minusMonths(12);
    System.out.println(n);//from ww  w  .  j  a v  a  2  s. c o  m
}