question: public static boolean isValid ( Timestamp validFrom , Timestamp validTo , Timestamp testDate ) { if ( testDate == null ) return true ; if ( validFrom == null && validTo == null ) return true ; if ( validFrom != null && validFrom . after ( testDate ) ) return false ; if ( validTo != null && validTo . before ( testDate ) ) return false ; return true ; }
target:  Is it valid on test date