title: Comparing Swift Dates by Year
body: <p>Comparing dates in Swift is really simple and easily understandable. 
  It can be written in a single line, for example:</p>
  
  <pre><code>if date1 &gt; date2
  </code></pre>
  
  <p>But what if I want to check if Date1 is <strong>3 years</strong> smaller or greater than Date2?</p>