List of usage examples for java.time MonthDay now
public static MonthDay now()
From source file:Main.java
public static void main(String[] args) { MonthDay m = MonthDay.now(); System.out.println(m.isAfter(MonthDay.of(Month.APRIL, 1))); }
From source file:Main.java
public static void main(String[] args) { MonthDay m = MonthDay.now(); MonthDay n = m.with(Month.JANUARY); System.out.println(n); }
From source file:Main.java
public static void main(String[] args) { MonthDay m = MonthDay.now(); System.out.println(m.equals(MonthDay.of(Month.APRIL, 1))); }
From source file:Main.java
public static void main(String[] args) { MonthDay m = MonthDay.now(); System.out.println(m.isBefore(MonthDay.of(Month.APRIL, 1))); }
From source file:Main.java
public static void main(String[] args) { MonthDay m = MonthDay.now(); LocalDate n = m.atYear(1990); System.out.println(n); }
From source file:Main.java
public static void main(String[] args) { MonthDay m = MonthDay.now(); long n = m.getLong(ChronoField.MONTH_OF_YEAR); System.out.println(n);/* w w w . jav a 2 s .c o m*/ }
From source file:Main.java
public static void main(String[] args) { MonthDay m = MonthDay.now(); boolean n = m.isSupported(ChronoField.MONTH_OF_YEAR); System.out.println(n);//ww w . j a v a 2s .c o m }
From source file:Main.java
public static void main(String[] args) { MonthDay m = MonthDay.now(); long n = m.get(ChronoField.MONTH_OF_YEAR); System.out.println(n);/*from w w w. ja v a2 s . co m*/ }
From source file:Main.java
public static void main(String[] args) { MonthDay m = MonthDay.now(); String n = m.format(DateTimeFormatter.ofPattern("M")); System.out.println(n);/*from ww w . j av a 2s. com*/ }
From source file:Main.java
public static void main(String[] args) { MonthDay m = MonthDay.now(); Temporal n = m.adjustInto(LocalDate.now()); System.out.println(n);/*from w w w.jav a2 s .c o m*/ }