Skip to content Skip to footer navigation
🏰 Statamic Summit 2027 Feb 16–19 Talks, workshops, and three nights in a German castle. Get Tickets

Days Ago Modifier

Returns the number of days since a given date variable. Statamic will attempt to parse any string as a date, but try to keep it in the least ambiguous date format possible.

# Assuming the current date is June 25, 2012.
date: June 19 2012
{{ date | days_ago }}
{{ Statamic::modify($date)->daysAgo() }}
6