title: Time interval in 15-minutes increment format
body: <p>I have a textbox labelled 'Time' which accepts 12-hour or 24-hour time and converts it to 12-hour format i.e (hh:mma) format.</p>
  
  <p>My requirement is to now convert time to 15 min increments format. </p>
  
  <p>For eg: </p>
  
  <p>If user enters 01:10a , it should be converted to 01:15a automatically.</p>
  
  <p>Special cases: </p>
  
  <p>If user enters 11:53a , it should be converted to 12:00p (notice am/pm value changes here)</p>
  
  <p>If user enters 11:53p, it should be converted to 12:00a (notice am/pm value changes here)</p>
  
  <p>This needs to be done within a javascript function.</p>
  
  <p>Please suggest what logic I should use for this conversion.</p>