ChronoLocalDate isLeapYear() method in Java with Examples Last Updated : 29 Apr, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report The isLeapYear() method of ChronoLocalDate interface in Java checks if the year is leap year or not. Syntax: public boolean isLeapYear() Parameter: This method does not accept parameters. Return Value: The function returns true if the year is leap, false otherwise. Below programs illustrate the isLeapYear() method of ChronoLocalDate in Java: Program 1: Java // Program to illustrate the isLeapYear() method import java.util.*; import java.time.*; import java.time.chrono.*; public class GfG { public static void main(String[] args) { // Parses the first date ChronoLocalDate dt1 = LocalDate.parse("2018-11-27"); // Checks System.out.println(dt1.isLeapYear()); } } Output: false Program 2: Java // Program to illustrate the isLeapYear() method import java.util.*; import java.time.*; import java.time.chrono.*; public class GfG { public static void main(String[] args) { // Parses the first date ChronoLocalDate dt1 = LocalDate.parse("2012-11-27"); // Checks System.out.println(dt1.isLeapYear()); } } Output: true Reference: https://docs.oracle.com/javase/9/docs/api/java/time/chrono/ChronoLocalDate.html#isLeapYear-- Comment More infoAdvertise with us Next Article ChronoLocalDate get() method in Java with Examples K Kirti_Mangal Follow Improve Article Tags : Java Java-Functions Java-time package Java-ChronoLocalDate Practice Tags : Java Similar Reads ChronoLocalDate getEra() method in Java with Examples The getEra() method of ChronoLocalDate interface in Java gets the era applicable at this date. Syntax: public Era getEra() Parameter: This method does not accepts any parameter. Return Value: The function returns the IsoChronology era constant applicable at this date and not null. Below programs ill 1 min read ChronoLocalDate get() method in Java with Examples The get() method of ChronoLocalDate interface in Java method gets the value of the specified field from this Date as an int. Syntax: public int get(TemporalField field) Parameter: This method accepts a parameter field which is the field to get and not necessary null. Return Value: It returns the val 2 min read ChronoLocalDate from() method in Java with Examples The from() method of ChronoLocalDate interface in Java method obtains an instance of ChronoLocalDate from a temporal object. Syntax: public static ChronoLocalDate from(TemporalAccessor temporal) Parameter: This method accepts a parameter temporal which specifies the temporal object to convert and no 1 min read ChronoLocalDate getLong() method in Java with Examples The getLong() method of ChronoLocalDate interface in Java gets the era applicable at this date. Syntax: public long getLong(TemporalField field) Parameter: This method accepts a single mandatory parameter field which specifies the field to get and not null. Return Value: The function returns the val 2 min read ChronoLocalDate format() method in Java with Examples The format() method of ChronoLocalDate interface in Java method formats this date using the specified formatter. Syntax: public String format(DateTimeFormatter formatter) Parameter: This method accepts a parameter obj which specifies the formatter to be used and it is not null. Exceptions: The funct 2 min read ChronoLocalDate lengthOfYear() method in Java with Examples The lengthOfYear() method of ChronoLocalDate interface in Java returns the length of the year represented by this date. Syntax: public int lengthOfYear() Parameter: This method does not accept parameters. Return Value: The function returns 366 if the year is leap, 365 otherwise. Below programs illus 1 min read Like