Swift 3 - Comparing Date objects
<p>I'm updating my app to Swift 3.0 syntax (I know it's still in beta but I want to be prepared as soon as it released).</p>
<p>Until the previous Beta of Xcode (Beta 5) I was able to compare two <code>Date</code> objects using the operands <code>&lt;</code>, <code>&gt;</code> and <code>==</code>. But in the latest beta (Beta 6) this isn't working any more. Here are some screenshots:</p>
<p><a href="https://i.stack.imgur.com/ur9rc.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ur9rc.png" alt="enter image description here" /></a>
<a href="https://i.stack.imgur.com/Xgv4r.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Xgv4r.png" alt="enter image description here" /></a></p>
<p>As you can see in both screenshots, these are two <code>Date</code> objects. But I get the following error:
<a href="https://i.stack.imgur.com/Lfzj3.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Lfzj3.png" alt="enter image description here" /></a></p>
<p>What am I doing wrong? The functions are still declared in the <code>Date</code> class:</p>
<blockquote>
<p><code>static func &gt;(Date, Date)</code></p>
<blockquote>
<p>Returns true if the left hand Date is later in time than the right hand Date.</p>
</blockquote>
</blockquote>
<p>Is this just a Beta bug or am I doing something wrong?</p>