Radical Design Course by Jack McDade

From the creator of Statamic

Learn how to make your websites standout and be remembered.

This course is the most refreshing take on teaching design that I've come across.

— Mikaël Sévigny, Developer

modify_date Modifier

Alters a timestamp by incrementing or decrementing in a format accepted by PHP's native strtotime() method.

date: January 1, 2000
{{ date | modify_date("-1 day") }}
{{ date | modify_date("next Sunday") }}
{{ date | modify_date("+3 months") }}
December 31, 1999
January 2, 2000
April 1, 2000
Hot Tip!

As of Statamic 5, this modifier will return a copy of the Date. Earlier versions would modify the variable directly which will be passed onto any additional modifiers.

Docs feedback

Submit improvements, related content, or suggestions through Github.

Betterify this page →