LocalDate getChronology() example

Description

LocalDate getChronology() gets the chronology of this date, which is the ISO calendar system.

Syntax

getChronology has the following syntax.


public IsoChronology getChronology()

Example

The following example shows how to use getChronology.


import java.time.LocalDate;
/*from www .  j  a  v a  2s .  c  om*/
public class Main {
  public static void main(String[] args) {
    LocalDate a = LocalDate.of(2014, 6, 30);

    System.out.println(a.getChronology().getId());
  }
}

The code above generates the following result.





















Home »
  Java Date Time »
    java.time Reference »




Clock
DayOfWeek
Duration
Instant
LocalDate
LocalDateTime
LocalTime
Month
MonthDay
OffsetDateTime
OffsetTime
Period
Year
YearMonth
ZonedDateTime
ZoneId
ZoneOffset