How to filter posts in admin by before date or by post status ‘future’?

The question pretty much got covered in another thread here.

In case anyone else need anything like this I ended up using following code to hide all the posts that are over a week in the future.

function hide_future_posts($where, $q) {
    if(is_admin() && $q->is_main_query() && !filter_input(INPUT_GET, 'post_status') && ( $screen = get_current_screen() ) instanceof \WP_Screen && 'edit-post' === $screen->id) {
        global $wpdb;

        $where .= sprintf(" AND {$wpdb->posts}.post_date <= ( '%s' )", date('Y-m-d', strtotime('+1 week')));
    }
    return $where;
}
add_action( 'posts_where', 'hide_future_posts', 10, 2 );