/** * Is the given year a year year in the Herschel Calendar? * @param yyyy the year * @return true if the year is a leap year */ public static final boolean isLeapViaHerschel ( int yyyy ) { if ( yyyy < 0 ) return( yyyy + 1 ) % 4 == 0; if ( yyyy < 1582 ) return yyyy % 4 == 0; if ( yyyy % 4 != 0 ) return false; if ( yyyy % 100 != 0 ) return true; if ( yyyy % 400 != 0 ) return false; if ( yyyy % 4000 != 0 ) return true; return false; }