List of usage examples for java.time Month length
public int length(boolean leapYear)
Source Link
From source file:Main.java
public static void main(String[] args) { Month m = Month.from(LocalDate.now()); System.out.println(m.length(true)); }