private static final Date stripDatesAfterCurrentDate ( final Date toDate ) { final DateTime currentTime = new DateTime ( ) ; if ( currentTime . isBefore ( toDate . getTime ( ) ) ) { return currentTime . plusDays ( 1 ) . toDate ( ) ; } else { return toDate ; } }
Strip dates after current date .