Example usage for java.time ZonedDateTime query

List of usage examples for java.time ZonedDateTime query

Introduction

In this page you can find the example usage for java.time ZonedDateTime 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) {
    ZonedDateTime dateTime = ZonedDateTime.now();
    LocalDate o = dateTime.query(TemporalQueries.localDate());
    System.out.println(o);/* w  w  w . j av a  2 s  .c o  m*/
}