I want to compare a date (mydate) with today. I tried
new Date(mydate) < new Date();
which works in all cases apart from the case my date equals today. In that case the above returns true
since it compares the time included. However, I want to compare only the date, not the time.
I tried moment.js as well:
moment(mydate).format('DD-MM-YYYY')<moment().format('DD-MM-YYYY')
however, not even this one did work. What do I have to write?