Hide dates in the present in .tpl.php files I've got a content type (Events) and they have event dates. Some of them have multiple dates, some of them haven't. But I want to hide the dates which are in the past.



Obviously, February 15th and April 18th are already passed. How can I hide them?

When I do var_dump($content) in the tpl, all I got is this:

&lt;span class="date-display-single"&gt;15 February 2012 - &lt;span class="date-display-start"&gt;14:00&lt;/span&gt; to &lt;span class="date-display-end"&gt;16:30&lt;/span&gt;&lt;/span&gt;


So it looks like I can't filter in PHP since it's already converted into HTML. Any idea how I can filter this?

EDIT: screenshot of my date section
Presuming you are using the Date module. In the Manage Display settings for the content type, modify the setting for the Date output and put 'now' in the 'starting from' box.