Example usage for java.time OffsetDateTime isSupported

List of usage examples for java.time OffsetDateTime isSupported

Introduction

In this page you can find the example usage for java.time OffsetDateTime 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) {
    OffsetDateTime o = OffsetDateTime.now();
    boolean l = o.isSupported(ChronoUnit.DAYS);
    System.out.println(l);/*from  w  ww.j ava2s. co  m*/
}

From source file:Main.java

public static void main(String[] args) {
    OffsetDateTime o = OffsetDateTime.now();
    boolean l = o.isSupported(ChronoField.DAY_OF_WEEK);
    System.out.println(l);//from   w ww. j  a va2s  . c  om
}