// if year( and eon) are undefined, leave default Calendar values
BigInteger year = getEonAndYear();
if (year != null) {
result.set(Calendar.ERA, year.signum() == -1 ? GregorianCalendar.BC : GregorianCalendar.AD);
result.set(Calendar.YEAR, year.abs().intValue());
} else {
// use default if set
BigInteger defaultYear = (defaults != null) ? defaults.getEonAndYear() : null;
if (defaultYear != null) {
result.set(Calendar.ERA, defaultYear.signum() == -1 ? GregorianCalendar.BC : GregorianCalendar.AD);