List of usage examples for java.time LocalDate now
public static LocalDate now()
From source file:Main.java
public static void main(String[] args) { Year y = Year.from(LocalDate.now()); System.out.println(y); }
From source file:Main.java
public static void main(String[] args) { // Human Readable LocalDate date = LocalDate.now(); System.out.println(String.format("%s-%s-%s", date.getYear(), date.getMonthValue(), date.getDayOfMonth())); }
From source file:Main.java
public static void main(String[] args) { Month m = Month.from(LocalDate.now()); System.out.println(m.minLength()); }
From source file:Main.java
public static void main(String[] args) { Month m = Month.from(LocalDate.now()); System.out.println(m.firstDayOfYear(false)); }
From source file:Main.java
public static void main(String[] args) { Month m = Month.from(LocalDate.now()); System.out.println(m.getValue()); System.out.println(m.name()); System.out.println(m.ordinal()); }
From source file:Main.java
public static void main(String[] args) { Month m = Month.from(LocalDate.now()); System.out.println(m.firstMonthOfQuarter()); }
From source file:Main.java
public static void main(String[] args) { Month m = Month.from(LocalDate.now()); System.out.println(m.plus(8)); }
From source file:Main.java
public static void main(String[] args) { Month m = Month.from(LocalDate.now()); System.out.println(m.length(true)); }
From source file:Main.java
public static void main(String[] args) { Month m = Month.from(LocalDate.now()); System.out.println(m.maxLength()); }
From source file:Main.java
public static void main(String[] args) { Month m = Month.from(LocalDate.now()); System.out.println(m.minus(8)); }