Example usage for java.time OffsetDateTime minusWeeks

List of usage examples for java.time OffsetDateTime minusWeeks

Introduction

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

Prototype

public OffsetDateTime minusWeeks(long weeks) 

Source Link

Document

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

Usage

From source file:Main.java

public static void main(String[] args) {
    OffsetDateTime o = OffsetDateTime.now();
    OffsetDateTime d = o.minusWeeks(120);
    System.out.println(d);/*from w w w.jav a 2  s  .c o  m*/
}