time_minus

Subtracts an interval of time from an ISO8601 timestamp.

Interval units include: years, months, weeks, days, hours, minutes, seconds, milliseconds

Input

{{ node.createdTime | time_minus: 1, "years"}}

Output

2020-06-01T10:50:00.000Z

The time_minus filter can be applied multiple times

Input

{{ "2021-06-01T10:50:00.000Z" | time_minus: 1, "years" | time_minus: 2, "days"}}

Output

2020-05-30T10:50:00.000Z

Format the timestamp by applying the time filter last

Input

{{ "2021-06-01T10:50:00.000Z" | time_minus: 1, "years" | time: "MMMM YYYY"}}

Output

June 2020
PDF HTML Epub Powered by Read The Docs