Is Past Modifier
Returns true if date is in the past.
# Assuming the current date is June 20, 2012.
date: June 19 2012
another_date: June 21 2012
{{ if date | is_past }}
{{ if another_date | is_past }}
@if (Statamic::modify($date)->isPast()->fetch()) ... @endif
@if (Statamic::modify($another_date)->isPast()->fetch()) ... @endif
true
false
Warning!
Date modifiers preserve the date value's timezone by default. Dated entries use UTC. Enable localize_dates_in_modifiers in config/statamic/system.php to convert dates to your display timezone before applying modifiers.
Please refer to our Timezones guide for more information.