Skip to content Skip to footer navigation
You are reading the Statamic 6 Alpha docs. πŸ‘€

Is Future Modifier

Returns true if date is in the future.

date: October 21 2015
another_date: November 2030
{{ if date | is_future }}
{{ if another_date | is_future }}
@if (Statamic::modify($date)->isFuture()->fetch()) ... @endif
@if (Statamic::modify($another_date)->isFuture()->fetch()) ... @endif
false
true
Warning!

By default, when using a modifier on a date variable, it will be operating on the UTC date rather than the localized date.

Please refer to our Timezones guide for more information.

A troll pointing a teaching stick