1

I am working on a project using angular 5, and i want to compare to time values, one being the now time, and the other being the value i want to compare the now time with, so that if a particular condition is true, i can enable a button i disable, but i don't know how to go through with the logic involve, i try to do this but is not working:

now: any = Date.now();


 compareTime = '12:00:00pm'

And one hour after the now time is equal to compareTime, the button is disable again, then till the next day at noon, the button will be enable for an hour again, from 12:00:00pm to 01:00:00pm, and i have not been able to reach any document that will help me.

Anana Aristotle
  • 344
  • 4
  • 12
  • Possible duplicate of [How to compare time in javascript?](https://stackoverflow.com/questions/19004950/how-to-compare-time-in-javascript) – You Nguyen Sep 24 '18 at 13:31

0 Answers0