Example usage for java.time OffsetDateTime get

List of usage examples for java.time OffsetDateTime get

Introduction

In this page you can find the example usage for java.time OffsetDateTime get.

Prototype

@Override
public int get(TemporalField field) 

Source Link

Document

Gets the value of the specified field from this date-time as an int .

Usage

From source file:Main.java

public static void main(String[] args) {
    OffsetDateTime o = OffsetDateTime.now();
    int l = o.get(ChronoField.DAY_OF_WEEK);
    System.out.println(l);/*from   w ww  . j ava2 s.  co m*/
}