Java Date Time - Period getChronology() example








Period getChronology() gets the chronology of this period, 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.Period;
/* ww w  .  ja v a 2  s .  c  o  m*/
public class Main {
  public static void main(String[] args) {
    Period p = Period.ofMonths(1);
    
    System.out.println(p.getChronology());

  }
}

The code above generates the following result.