title: Compare two dates
body: <p>How can I compare two different dates to find out which is the later date? For example, in <code>date1</code> I will store one date after downloading some data, and in <code>date2</code>, I will store the current date. Then I need to check which one is greater/later: something like <code>if(date1&gt;date2)</code>.</p>