title: compare date and time in JS
body: <p>I am authenticating user using oAuth2 which gives me expiry token. </p>
  
  <p>The expiry token is for 3600 (which means one hour, as per oauth standard)</p>
  
  <p>Now, when the token expire, I want to use refresh token to get new access token. </p>
  
  <p>To see if the token have expired, I am thinking about storing the value of current Date.now() and the value of Date.now() after one hour. </p>
  
  <p>THe problem is that <code>date.now()</code> gives value in long int i.e </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>let date = Date.now() 
  console.log(date)</code></pre>
  </div>
  </div>
  </p>
  
  <p>Now, I am unable to comprehend how I can compare time here. Can somenone help me.</p>