title: How can I set equality condition for Date now and a pre-defined date?
body: <p>I am trying to set the condition below to run Condition1 if <code>new Date(visitationDate)</code> is equal to <code>Date.now()</code>.</p>
  <p>In the frontend the visitationDate come in as <code>Thu Nov 11 2021 13:52:33 GMT+0100 (West Africa Standard Time)</code> and I convert it with a function to the format <code>2021-11-11T13:00:00.000Z</code> before sending it to the backend. I am using the date condition in my question in the backend. I can revert the conversion in the frontend if it will resolve my issue.</p>
  <p>This is my current code used in the backend</p>
  <pre><code>if (new Date(visitationDate) == Date.now()) {
     Condition1
  } else {
     Condition2
  }
  </code></pre>
  <p>My question is how can I run Condition2 if the visitationDate is less than Date.now() or Date.now() is greater than visitationDate. I want to run Condition1 only if visitationDate is the current date or equal to Date.now() in a 24 hour window.</p>