Example usage for java.time Year isSupported

List of usage examples for java.time Year isSupported

Introduction

In this page you can find the example usage for java.time Year isSupported.

Prototype

@Override
public boolean isSupported(TemporalUnit unit) 

Source Link

Document

Checks if the specified unit is supported.

Usage

From source file:Main.java

public static void main(String[] args) {
    Year y = Year.of(2014);

    System.out.println(y.isSupported(ChronoUnit.YEARS));

}

From source file:Main.java

public static void main(String[] args) {
    Year y = Year.of(2014);

    System.out.println(y.isSupported(ChronoField.YEAR));

}