List of usage examples for java.time Instant query
@SuppressWarnings("unchecked") @Override public <R> R query(TemporalQuery<R> query)
From source file:Main.java
public static void main(String[] args) { Instant instant = Instant.parse("2014-12-03T10:15:30.00Z"); LocalDate z = instant.query(TemporalQueries.localDate()); System.out.println(z);// w ww.ja v a 2s . c o m }
From source file:Main.java
public static void main(String[] args) { Clock defaultClock = Clock.systemDefaultZone(); Instant instant = Instant.now(defaultClock); TemporalQuery query = (TemporalAccessor x) -> x.isSupported(ChronoField.MILLI_OF_DAY); System.out.println(instant.query(query)); }