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

Weeks Ago Modifier

Returns the number of weeks 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 July 3, 2012.
date: June 19 2012
{{ date | weeks_ago }}
{{ Statamic::modify($date)->weeksAgo() }}
2