title: how to get the days and exact minutes,exact hours from two dates in javascript?
body: <p>I have start date time and end time,i need to split how many days , hours ,minutes in the two dates </p>
  
  <p>for example , 
      startdatetime = "09-06-2017 10:30" 
      enddatetime = "10-06-2017 11:45" </p>
  
  <p>i need this result : 1 day 1 hour and 15 minutes</p>
  
  <p>I try this one</p>
  
  <pre><code>var t = end - start;
  var z = parseInt(t / 1000 / 60);
  var time = display(z);
  function display(a)
  {
      console.log(a);
      var hours = Math.trunc(a/60);
      var minutes = a % 60; 
      var one_day=1000*60*60*24
      var days = Math.ceil(a/one_day)
      var time = [hours,minutes,days];
      return time;
  }
  </code></pre>
  
  <p>i get the following 1day 24 hours and 15 minutes , can anyone help me , if its new logic means i will change into it,thanks in advance</p>