List of usage examples for java.time YearMonth query
@SuppressWarnings("unchecked") @Override public <R> R query(TemporalQuery<R> query)
From source file:Main.java
public static void main(String[] args) { YearMonth y = YearMonth.now(); Chronology s = y.query(TemporalQueries.chronology()); System.out.println(s);/*from ww w .j av a2s .c om*/ }
From source file:Main.java
public static void main(String[] args) { YearMonth yearMonth = YearMonth.of(2014, 6); System.out.println(yearMonth.query(new SchoolHolidayQuery())); // false System.out.println(YearMonth.of(2014, Month.JULY).query(new SchoolHolidayQuery())); // true System.out.println(YearMonth.of(2014, 8).query(new SchoolHolidayQuery())); // true }