title: convert time 12 hour format to 24 hour format and vice-versa
body: <p>I want a js script that converts inputted time to 24 hour format or 12 hour format.</p>
  
  <p>Example,</p>
  
  <ul>
  <li><p>time is entered as <code>10_10_am</code> result should be:-</p>
  
  <p><code>10:10 AM</code> (12 hr format) and <code>10:10</code> (24 hr format)</p></li>
  <li><p>time is entered as <code>10_10_pm</code> result should be:-</p>
  
  <p><code>10:10 PM</code> (12 hr format) and <code>22:10</code> (24 hr format)</p></li>
  </ul>