title: Convert date object to milliseconds in angularjs
body: <p>How can I get the starting time of a particular dateobject in milliseconds? my dateobject is in below format.</p>
  
  <pre><code>Sun Oct 16 2016 21:33:35 GMT+0530 (India Standard Time)
  </code></pre>
  
  <p>My input </p>
  
  <blockquote>
    <p>dateobject = Sun Oct 16 2016 21:33:35 GMT+0530 (India Standard Time);</p>
  </blockquote>
  
  <p>Required Output </p>
  
  <blockquote>
    <p>Sun Oct 16 2016 00:00:00 GMT+0530 (India Standard Time)</p>
  </blockquote>
  
  <p>Irrespective of time, I want to get the starting time of this date in milliseconds(i.e Sun Oct 16 2016 00:00:00 GMT+0530 (India Standard Time)?
  Sun Oct 16 2016 21:33:35 GMT+0530 (India Standard Time) -> Sun Oct 16 2016 00:00:00 GMT+0530 (India Standard Time)->1476556200000</p>
  
  <p>I tried like this.   </p>
  
  <pre><code>     var date_form = $filter('dateobject')(toDate, 'yyyy/MM/dd');
           (date_form=2016/10/16)
       var full_date = new Date($filter('date')(date_form, 'fullDate'));
          (full_date = Oct 16 2016 00:00:00 GMT+0530 (India Standard Time))
       var milliseconds = full_date.getMilliseconds();
  </code></pre>
  
  <p>I am not getting the proper output? Is this correct one?</p>