private final int yearType ( int year ) { int yearLength = handleGetYearLength ( year ) ; if ( yearLength > 380 ) { yearLength -= 30 ; // Subtract length of leap month. } int type = 0 ; switch ( yearLength ) { case 353 : type = 0 ; break ; case 354 : type = 1 ; break ; case 355 : type = 2 ; break ; default : throw new IllegalArgumentException ( "Illegal year length " + yearLength + " in year " + year ) ; } return type ; }
Returns the the type of a given year . 0 Deficient year with 353 or 383 days 1 Normal year with 354 or 384 days 2 Complete year with 355 or 385 days