title: javascript check if date object is at least 5 minutes old (nodeJS)
body: <p>How to compare a date object in javascript to check if the object is at least 5 minutes old? I tried:</p>
  
  <pre><code>//current date
  var date = new Date();
  //data from database
  console.log("db: " + data_from_database)
  console.log("current date: " + date)
  
  //how to check if "data_from_database is at least 5 minutes old?
  </code></pre>
  
  <blockquote>
    <p>db: Sun Jul 16 2017 23:59:59 GMT+0200 (CEST)</p>
    
    <p>current date: Sun Jul 16 2017
    14:12:43 GMT+0200 (CEST)</p>
  </blockquote>
  
  <p>How to perform the check the simplest way without creating tons of new objects?</p>