List of usage examples for java.time Year of
public static Year of(int isoYear)
From source file:Main.java
public static void main(String[] args) { Year y = Year.of(2014); Year l = y.plus(2, ChronoUnit.YEARS); System.out.println(l); }
From source file:Main.java
public static void main(String[] args) { Year y = Year.of(2014); System.out.println(y.get(ChronoField.YEAR)); }
From source file:Main.java
public static void main(String[] args) { Year y = Year.of(2014); Year l = y.with(ChronoField.YEAR, 2013); System.out.println(l); }
From source file:Main.java
public static void main(String[] args) { Year y = Year.of(2014); System.out.println(y.isSupported(ChronoField.YEAR)); }
From source file:Main.java
public static void main(String[] args) { Year y = Year.of(2014); System.out.println(y.getLong(ChronoField.YEAR)); }
From source file:Main.java
public static void main(String[] args) { Year y = Year.of(2014); System.out.println(y.range(ChronoField.YEAR)); }
From source file:Main.java
public static void main(String[] args) { Year y = Year.of(2014); String l = y.format(DateTimeFormatter.ofPattern("yyyy")); System.out.println(l);//from w ww . j av a2 s . c o m }
From source file:Main.java
public static void main(String[] args) { Year y = Year.of(2014); System.out.println(y.isValidMonthDay(MonthDay.of(Month.APRIL, 1))); }
From source file:Main.java
public static void main(String[] args) { Year y = Year.of(2014); YearMonth l = y.atMonth(Month.JANUARY); System.out.println(l); }
From source file:Main.java
public static void main(String[] args) { Year y = Year.of(2014); Chronology l = y.query(TemporalQueries.chronology()); System.out.println(l);/*from ww w. ja va 2s.com*/ }