Skip to content Skip to footer navigation
πŸ† Vote for your favorite CMS at the CMS Critic Awards! Voting ends Feb 28th.

Months Ago Modifier

Returns the number of months 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.

date: October 1 2017
{{ date | months_ago }}
{{ Statamic::modify($date)->monthsAgo() }}
{{ test_date | months_ago }}