title: momentjs won't get difference between two dates
body: <p>I'm trying to get the difference between now and an end date in minutes. I have two date variables, but when i try to subtract them, it says <code>Property 'diff' does not exist on type 'string'.</code> </p>
  
  <p>console.log(now) outputs: <code>November 24th 2019, 11:13:32</code></p>
  
  <p>console.log(endDate) outputs: <code>November 24th 2019, 12:25:10</code></p>
  
  <p>so the values are in date format.</p>
  
  <p>I appreciate any help</p>
  
  <pre><code>let endDateTime = moment
    .unix(parseInt(auctionEndDateTime))
    .format("MMMM Do YYYY, h:mm:ss");
  
  
  let start=moment(Date.now());
  let end=moment(endDateTime);
  let duration = moment.duration(end.diff(start));
  let hours = duration.asHours();
  
  
  console.log('hours ' + hours);
  console.log('days ' + duration.asDays());
  </code></pre>