Code example for Date

Methods: before

0
        if (this.validFromDate == null) {
            return true; 
        } 
 
        final Date now = new Date();
        return this.validFromDate.before(now) && (this.validUntilDate == null || this.validUntilDate.after(now));
    } 
}