Calculate the date a period of time in the past from today : <p>I use this code to get the current date</p>

<pre><code>let date = Date()
let formatter = DateFormatter()
formatter.dateFormat = "yyyy.MM.dd"
let result = formatter.string(from: date)
</code></pre>

<p>Any idea on how can I get the date in the past, for example a day or a year before the current date?</p>
