public Chronology getChronology ( Object object , DateTimeZone zone ) { if ( object . getClass ( ) . getName ( ) . endsWith ( ".BuddhistCalendar" ) ) { return BuddhistChronology . getInstance ( zone ) ; } else if ( object instanceof GregorianCalendar ) { GregorianCalendar gc = ( GregorianCalendar ) object ; long cutover = gc . getGregorianChange ( ) . getTime ( ) ; if ( cutover == Long . MIN_VALUE ) { return GregorianChronology . getInstance ( zone ) ; } else if ( cutover == Long . MAX_VALUE ) { return JulianChronology . getInstance ( zone ) ; } else { return GJChronology . getInstance ( zone , cutover , 4 ) ; } } else { return ISOChronology . getInstance ( zone ) ; } }
Gets the chronology which is the GJChronology if a GregorianCalendar is used BuddhistChronology if a BuddhistCalendar is used or ISOChronology otherwise . The time zone specified is used in preference to that on the calendar .