The getChronology() method of ChronoLocalDateTime interface in Java gets the chronology of this date of the calendar system in use.
Syntax:
default Chronology getChronology()
Parameter: This method does not accept any parameter.
Return Value: It returns the chronology and not null.
Below programs illustrate the getChronology() method of ChronoLocalDateTime in Java:
Program 1:
// Program to illustrate the getChronology() method import java.util.*; import java.time.*; import java.time.chrono.*; import java.time.temporal.ChronoField; public class GfG { public static void main(String[] args) { ChronoLocalDateTime date = LocalDateTime .from(ZonedDateTime.now()); System.out.println(date.getChronology()); } } |
ISO
Reference: https://docs.oracle.com/javase/9/docs/api/java/time/chrono/ChronoLocalDateTime.html#getChronology–
Attention reader! Don’t stop learning now. Get hold of all the important Java and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready.
Recommended Posts:
- ChronoLocalDate getChronology() method in Java with Examples
- ChronoZonedDateTime getChronology() method in Java with Examples
- ChronoPeriod getChronology() method in Java with Examples
- LocalDate getChronology() method in Java
- HijrahDate getChronology() method in Java with Example
- JapaneseDate getChronology() method in Java with Example
- MinguoDate getChronology() method in Java with Example
- ThaiBuddhistDate getChronology() method in Java with Example
- ChronoLocalDateTime toLocalDate() method in Java with Examples
- ChronoLocalDateTime query() method in Java with Examples
- ChronoLocalDateTime get() method in Java with Examples
- ChronoLocalDateTime minus(TemporalAmount) method in Java with Examples
- ChronoLocalDateTime with(TemporalField, long) method in Java with Examples
- ChronoLocalDateTime isSupported(TemporalUnit) method in Java with Examples
- ChronoLocalDateTime toString() method in Java with Examples
- ChronoLocalDateTime range() method in Java with Examples
- ChronoLocalDateTime getLong() method in Java with Examples
- ChronoLocalDateTime isSupported(TemporalField ) method in Java with Examples
- ChronoLocalDateTime until() method in Java with Examples
- ChronoLocalDateTime toLocalTime() method in Java with Examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

