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
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.

Docs Feedback
Submit improvements, related content, or suggestions through Github.
Betterify this page