date_months_ago

Retrieves a date that is a specified number of months ago from a given date.

Example

1
{{ 1 | date_months_ago: '2020-01-15' }} => 2019-12-15

Input

Type Parameter Description Required
int monthsAgo The number of months ago. Comes before the | sign. Required
string fromDateString The date to start from, defaults to the current date  

Output

Type Description
string The date that is the specified number of months ago