title: Subtract date from Jinja expression
body: <p>I want to remove 1 month from <code>current_date_operation</code> in Ansible task. This is what I tried:</p>
  <pre class="lang-yaml prettyprint-override"><code>vars:
    # for example current
    current_date_operation: &quot;{{ ansible_date_time.date }}&quot; 
    previous_date_operation : &quot;{{ '%Y-%m-%d'|strftime(current_date_operation.epoch|int - 2592000) }}&quot;
  </code></pre>
  <p>Unfortunately, the above code is giving the following error:</p>
  <blockquote>
  <p>&quot;msg&quot;: &quot;The task includes an option with an undefined variable. The error was: 'ansible.utils.unsafe_proxy.AnsibleUnsafeText object' has no attribute 'epoch'</p>
  </blockquote>
  <p>Any idea?</p>
  <p>Thanks</p>