Find Index of Array by NSDate?
<p>I would like to find out the index of an array by an NSDate. </p>

<p>Ill tried:</p>

<pre><code>var sectionsInTable = [NSDate]()

let indexOfElement = sectionsInTable.indexOf(date) // where date is an NSDate in my sectionsInTable Array

print(indexOfElement)
</code></pre>

<p>But ill always get <strong>false</strong></p>

<p>How is it possible to get the index of an NSDate from an array? </p>

<p>Thanks in advance.</p>