What is wrong with the code below?
Maybe it would be simpler to just compare date and not time. I am not sure how to do this either, and I searched, but I couldn\'t
Simply compare using .toDateString like below:
new Date().toDateString();
This will return you date part only and not time or timezone, like this:
"Fri Feb 03 2017"
Hence both date can be compared in this format likewise without time part of it.