I'm trying to figure out how best to compare dates in Angular 2 and TypeScript 1.8.7.
Given:
startDate: Date;
endDate: Date;
if(this.startDate.getUTCMilliseconds() === this.endDate.getUTCMilliseconds()){
//do stuff here
} else {
// do something else here
}
This will return an error like "startDate.getUTCMilliseconds is not a function..."
Does somebody have a best practice? Thanks,