ChronoLocalDateTime getChronology() method in Java with Examples
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–
Recommended Posts:
- ChronoPeriod getChronology() method in Java with Examples
- ChronoZonedDateTime getChronology() method in Java with Examples
- ChronoLocalDate getChronology() method in Java with Examples
- ChronoLocalDateTime get() method in Java with Examples
- ChronoLocalDateTime from() method in Java with Examples
- ChronoLocalDateTime until() method in Java with Examples
- ChronoLocalDateTime format() method in Java with Examples
- ChronoLocalDateTime compareTo() method in Java with Examples
- ChronoLocalDateTime equals() method in Java with Examples
- ChronoLocalDateTime adjustInto() method in Java with Examples
- ChronoLocalDateTime isBefore() method in Java with Examples
- ChronoLocalDateTime toLocalDate() method in Java with Examples
- ChronoLocalDateTime hashCode() method in Java with Examples
- ChronoLocalDateTime isEqual() 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.



