Skip to content Skip to footer navigation

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