Example usage for java.time Period getUnits

List of usage examples for java.time Period getUnits

Introduction

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

Prototype

@Override
public List<TemporalUnit> getUnits() 

Source Link

Document

Gets the set of units supported by this period.

Usage

From source file:Main.java

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

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

}