How do I hide pages in a collection with a published date set to the future?

I don’t know why I struggle with things that seem so simple. I have a collection, likely got the code from the Antimatter blog.htm.twig file. I want to have pages appear on the published date.

				{% for child in collection %}
			        {% include 'partials/wallpaper_item.html.twig' with {'page':child, 'truncate':true} %}
			    {% endfor %}

How can I get this code to hide posts that have publish_date set to the future?

You just need to set the use the .published() function wherever you defined your collection -

Collection::published() - Filters the current collection to include only published pages

ref: Page collections

Thank you for the help and I did try exactly what you suggested prior to asking here and then my brain melted down I guess. It does work as advertised! What confused me was the published: true switch in page front matter. It over-rides what is in published_date. So now I know, I just have to make sure the published switch is not used. I think what I will do is hide that switch in the blueprint so the customer does not use it. This way only the dates will control whether the posts show or not for this guy.

In case anybody finds this and wants to see the code. I just added .published to the loop.

{% for child in collection.published %}