datetime - Compare Dates in Angular 2 -
this question has answer here:
- javascript date object comparison 4 answers
i'm trying figure out how best compare dates in angular 2 , typescript 1.8.7.
given:
startdate: date; enddate: date; if(this.startdate.getutcmilliseconds() === this.enddate.getutcmilliseconds()){ //do stuff here } else { // else here }
this return error "startdate.getutcmilliseconds not function..."
does have best practice? thanks,
date object method milliseconds called gettime
.
Comments
Post a Comment