Example usage for java.time Period addTo

List of usage examples for java.time Period addTo

Introduction

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

Prototype

@Override
public Temporal addTo(Temporal temporal) 

Source Link

Document

Adds this period to the specified temporal object.

Usage

From source file:Main.java

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

    Temporal l = p.addTo(LocalDate.now());
    System.out.println(l);/*w  ww  . j  ava 2s  . c  o  m*/

}