code: 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);
          }
      }
docs: 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.
  
  @param object  the Calendar to convert, must not be null
  @param zone  the specified zone to use, null means default zone
  @return the chronology, never null
  @throws NullPointerException if the object is null
  @throws ClassCastException if the object is an invalid type