datetime - Compare Dates in Angular 2 -


this question has answer here:

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

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -