Example usage for java.time Period from

List of usage examples for java.time Period from

Introduction

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

Prototype

public static Period from(TemporalAmount amount) 

Source Link

Document

Obtains an instance of Period from a temporal amount.

Usage

From source file:Main.java

public static void main(String[] args) {

    Period p = Period.from(Period.ofMonths(12));

    System.out.println(p.toString());

}