Filtering a Matrix block for future dates I'm struggling with filtering future dates in a Matrix block that contains a date field.

I would like to display 'Open' or 'Closed' as the result of a condition checking if the value of matrix rows is today, but I only want to run the condition against future dates in the matrix block.  Past dates should be ignored.

In all examples I have seen, the search logic is at declared at the entries-level, but this is a matrix block and I can't get the two to connect.

My code...

{% set closed = craft.block('closedDates')
    .type('closedDate')
    .date('&gt;=' ~ today)
    .all() %}
{% for block in entry.closedDates.all() %}
    {% if today == closed %}
        &lt;p&gt;&lt;strong&gt;Closed&lt;/strong&gt;&lt;/p&gt;
    {% else %}
        &lt;p&gt;Open&lt;/p&gt;
    {% endif %}
{% endfor %}```

The (matrix) field = closedDates, the block type = closedDate, the field = date.

I prefer a matrix field so I have only 1 entry.

Would appreciate any suggestions.
Thanks Marten, yes, that's correct.

After plugging away I have gotten it to work, but it's likely not as efficient as it could be...

{% set today = now|date('Y-m-d') %}
{% set todayday = now|date('l') %}
{% for block in entry.closedDates.date('&gt;=' ~ today).limit(1) %}
    {% set closedDate = block.date.format('Y-m-d') %}
    {% if closedDate == today %}
        &lt;p&gt;&lt;strong&gt;It's a holiday, sorry, we're closed&lt;/strong&gt;&lt;/p&gt;
    {% elseif todayday == 'Sunday' %}
        &lt;p&gt;&lt;strong&gt;It's {{ todayday }}, sorry, we're closed&lt;/strong&gt;&lt;/p&gt;
    {% else %}
        &lt;p&gt;We're Open!&lt;/p&gt;
    {% endif %}
{% endfor %}


I added a check for whether today is Sunday, which is a normally closed day that would not be in the entry.

Doug