function isDateMatching(date1, date2) {
   if(  moment(date1).date()  == moment(date2).date() &&
        moment(date1).month() == moment(date2).month() &&
        moment(date1).year()  == moment(date2).year()
     ) {
       return true;
   }
   else {
      return false;
   }
}
/* This will return true if the date is same, irrespective of time */
This will return true if the date is same, irrespective of time
This will return true if the date is same irrespective of time
function isDateMatching(date1, date2) {
   if(  moment(date1).date()  == moment(date2).date() &&
        moment(date1).month() == moment(date2).month() &&
        moment(date1).year()  == moment(date2).year()
     ) {
       return true;
   }
   else {
      return false;
   }
}
function isDateMatching ( date1 , date2 ) { if ( moment ( date1 ) . date ( ) == moment ( date2 ) . date ( ) && moment ( date1 ) . month ( ) == moment ( date2 ) . month ( ) && moment ( date1 ) . year ( ) == moment ( date2 ) . year ( ) ) { return true ; } else { return false ; } }
This will return true if the date is same, irrespective of time
This will return true if the date is same irrespective of time