@ Override public boolean isOn ( Date date ) { synchronized ( calendar ) { calendar . setTime ( date ) ; int dayOfYear = calendar . get ( Calendar . DAY_OF_YEAR ) ; calendar . setTime ( computeInYear ( calendar . getTime ( ) , calendar ) ) ; return calendar . get ( Calendar . DAY_OF_YEAR ) == dayOfYear ; } }
Return true if the given Date is on the same day as Easter