Compare Dates in Angular 2
<p>I'm trying to figure out how best to compare dates in Angular 2 and TypeScript 1.8.7.</p>

<p>Given:</p>

<pre><code>startDate: Date;
endDate: Date;

if(this.startDate.getUTCMilliseconds() === this.endDate.getUTCMilliseconds()){
     //do stuff here
} else {
     // do something else here
}
</code></pre>

<p>This will return an error like "startDate.getUTCMilliseconds is not a function..."</p>

<p>Does somebody have a best practice?  Thanks,</p>