title: Convert 12-hour time format to 24 hour integer?
body: <p>In my app I have a drop-down box of strings that shows possible hours in 12-hour time for the user to select.  The possible values are:</p>
  
  <pre><code>9am
  10am
  11am
  12pm
  1pm
  2pm
  3pm
  4pm
  5pm
  </code></pre>
  
  <p>What code will convert one of these strings to a 24 hour integer? For example, <code>10am</code> should be converted to <code>10</code> and <code>4pm</code> should be converted to <code>16</code>.</p>