title: Get the minutes that have elapsed through moment diff
body: <p>I'm trying to get the difference in minutes between two timestamps</p>
  
  <p>I have a timestamp that looks like this to begin with</p>
  
  <pre><code>'15:44:06'
  </code></pre>
  
  <p>And when I want to find the time elapsed I create a new moment timestamp</p>
  
  <pre><code>var currentTimestamp = Moment(new Date()).format('HH:mm:ss');
  </code></pre>
  
  <p>Which returns this</p>
  
  <pre><code>'15:42:09'
  </code></pre>
  
  <p>I then attempt to get the difference like so</p>
  
  <pre><code>var duration = Moment.duration(Moment(currentTimestamp,'HH:mm:ss').diff(Moment(userTimestamp,'HH:mm:ss')));
  </code></pre>
  
  <p>And then attempt to get it in minutes</p>
  
  <pre><code>var elapsedTime = duration().asMinutes();
  console.log(elapsedTime);
  </code></pre>
  
  <p>But in the console when I log it I get this error</p>
  
  <pre><code>var elapsedTime = duration().asMinutes();
                    ^
  TypeError: object is not a function
  </code></pre>
  
  <p>I got most of this code from <a href="https://stackoverflow.com/questions/25394406/using-moment-js-to-calculate-elapsed-time">this stackoverflow</a></p>