List of usage examples for java.time LocalDateTime isSupported
@Override public boolean isSupported(TemporalUnit unit)
From source file:Main.java
public static void main(String[] args) { LocalDateTime now = LocalDateTime.now(); System.out.println(now.isSupported(ChronoField.YEAR)); System.out.println(now.isSupported(ChronoField.HOUR_OF_DAY)); System.out.println(ChronoField.YEAR.isSupportedBy(now)); System.out.println(ChronoField.HOUR_OF_DAY.isSupportedBy(now)); }
From source file:Main.java
public static void main(String[] args) { LocalDateTime a = LocalDateTime.of(2014, 6, 30, 12, 01); System.out.println(a.isSupported(ChronoUnit.DAYS)); }
From source file:Main.java
public static void main(String[] args) { LocalDateTime a = LocalDateTime.of(2014, 6, 30, 12, 01); System.out.println(a.isSupported(ChronoField.DAY_OF_WEEK)); }