title: How to calculate difference between two times in ionic using typescript?
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code> this.authService.drawgraph(id).subscribe(data =&gt; {
            if (data.success) {
              this.new._id = this.todosData[i]._id;
              this.new.sdate = this.todosData[i].sdate;
              this.new.stime = this.todosData[i].stime;
              this.new.etime = this.todosData[i].etime;</code></pre>
  </div>
  </div>
  </p>
  
  <p>this is how I'm getting the time stored (stime and etime) in my database. now I want to calculate the difference between these two times. </p>