protected int handleGetExtendedYear ( ) { int year ; if ( newestStamp ( ERA , YEAR , UNSET ) <= getStamp ( EXTENDED_YEAR ) ) { year = internalGet ( EXTENDED_YEAR , 1 ) ; // Default to year 1 } else { int cycle = internalGet ( ERA , 1 ) - 1 ; // 0-based cycle // adjust to the instance specific epoch year = cycle * 60 + internalGet ( YEAR , 1 ) - ( epochYear - CHINESE_EPOCH_YEAR ) ; } return year ; }
Implement abstract Calendar method to return the extended year defined by the current fields . This will use either the ERA and YEAR field as the cycle and year - of - cycle or the EXTENDED_YEAR field as the continuous year count depending on which is newer .