title: Calculating Military Time to Get Hours and Minutes Worked in Javascript
body: <p>I've got a few day's worth of "clock in" and "clock out" entries in military (24 hour) time that are plain numbers.</p>
  
  <pre><code>Clock In | Clock Out
  --------------------
  1020     | 1555
  1116     | 1857
  1049     | 1204
  </code></pre>
  
  <p>I've manually figured out that this person has worked <strong>14 hours and 31 minutes</strong>. I have an HTML page that contains a lot of these entries in a class, so I use the following code to get them in Javascript:</p>
  
  <pre><code>$('.clockin').each(function() {clockinsum += +$(this).text()||0;});
  $('.clockout').each(function() {clockoutsum += +$(this).text()||0;});
  </code></pre>
  
  <p>I'm not sure where to go from here, or if this is even the right way to start. Is there a way for Javascript/jQuery to calculate the hours and minutes worked from a bunch of these entries?</p>