compare a date with current date in moment code example
Example 1: moment is date equals
moment(date1).isSame(date2);
Example 2: compare two dates using moment
moment('2010-10-20').isAfter('2010-01-01', 'year'); // false
moment('2010-10-20').isAfter('2009-12-31', 'year'); // true