Skip to content Skip to footer navigation
You are reading the docs for an old version of Statamic. Consider upgrading to Statamic 6.

Is Leap Year Modifier

Returns true if date is in a leap year. Try and find a regular use for this one, we dare you.

date: November 2016
another_date: November 2017
{{ if date | is_leap_year }}
{{ if another_date | is_leap_year }}
@if (Statamic::modify($date)->isLeapYear()->fetch()) ... @endif
@if (Statamic::modify($another_date)->isLeapYear()->fetch()) ... @endif
true
false