Example usage for java.time OffsetDateTime query

List of usage examples for java.time OffsetDateTime query

Introduction

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

Prototype

@SuppressWarnings("unchecked")
@Override
public <R> R query(TemporalQuery<R> query) 

Source Link

Document

Queries this date-time using the specified query.

Usage

From source file:Main.java

public static void main(String[] args) {
    OffsetDateTime o = OffsetDateTime.now();
    LocalDate d = o.query(TemporalQueries.localDate());
    System.out.println(d);//  w ww.  j  av a 2 s  .c o  m
}