I did not find anything more straightforward than this:
{% for page in section.pages %}
{% if page.date %}
{% set page_time = page.date|date(format="%s")|int %}
{% set curr_time = now()|date(format="%s")|int %}
{% if page_time < curr_time %}
Hello from the past
{% else %}
Hello from the future
{% endif %}
{% endif %}
{% endor %}
But it works.