protected int handleGetLimit ( int field , int limitType ) { if ( field == ERA ) { if ( limitType == MINIMUM || limitType == GREATEST_MINIMUM ) { return BEFORE_MINGUO ; } else { return MINGUO ; } } return super . handleGetLimit ( field , limitType ) ; }
Override GregorianCalendar . There is only one Taiwan ERA . We should really handle YEAR YEAR_WOY and EXTENDED_YEAR here too to implement the 1 .. 5000000 range but it s not critical .