title: How to get the remaining hours between the current date and a date in a millisecond format in angular?
body: <p>I am using angularjs to display a list of items in jsonArray. and i want to compute the remaining hours so i think that in order to solve that i need to subtract the current date with the date from the jsonArray which is the <strong>purchaseTime</strong>. The output should be like this format: <strong>12 Hrs</strong></p>
  
  <p>Script</p>
  
  <pre><code>angular.module('myApp', []).controller('orderCtrl', function($scope, $filter) {
  $scope.orders = ${orderList.raw()};
  });
  </code></pre>
  
  <p>jsonArray item</p>
  
  <pre><code>"purchaseTime": "1449576000000"
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>&lt;div ng-app="myApp" ng-controller="orderCtrl"&gt;
  &lt;div class="divs" ng-repeat="order in orders| orderBy: '+purchaseTime'"&gt;
      &lt;div&gt;
          &lt;ul&gt;
              &lt;li&gt;&lt;p&gt;{{$index + 1}}&lt;/p&gt;&lt;/li&gt;
              &lt;li&gt;&lt;p&gt;{{(Date.now() - order.purchaseTime) | date:"h"}}&lt;/p&gt;&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>I think that I am not getting the right remaining time. Any help is very much appreciated. Thank you!</p>