title: How make a select dropdown to select an option value based on current time
body: <p>I have a select dropdown  with times in 30 min intervals like</p>
  
  <pre><code>11:00 AM, 11:30 AM, 12:00 PM, 12:30 PM, 1:00 PM
  </code></pre>
  
  <p>beginning from 0:00 AM and ending with 11:30 PM</p>
  
  <pre><code>&lt;select id='time'&gt;
    &lt;option value="11:30 AM"&gt;11:30 AM&lt;/option&gt;
    &lt;option value="12:00 PM"&gt;12:00 PM&lt;/option&gt;
    &lt;option value="12:30 PM"&gt;12:30 PM&lt;/option&gt;
    &lt;option value="1:00 PM"&gt;1:00 PM&lt;/option&gt;
   &lt;option value="1:30 PM"&gt;1:30 PM&lt;/option&gt;
   &lt;option value="2:00 PM"&gt;2:00 PM&lt;/option&gt;
   &lt;option value="2:30 PM"&gt;2:30 PM&lt;/option&gt;
   &lt;option value="3:00 PM"&gt;3:00 PM&lt;/option&gt;
   &lt;option value="3:30 PM"&gt;3:30 PM&lt;/option&gt;
   &lt;option value="4:00 PM"&gt;4:00 PM&lt;/option&gt;
   &lt;option value="4:30 PM"&gt;4:30 PM&lt;/option&gt;
  &lt;/select&gt;
  
  $(document).ready(function(){
  
    $('#time').val(.now()); // this wouldnt work it gives the current time which may be between 30 min 
  
  });
  </code></pre>
  
  <p>I want this select dropdown to default to rounded to nearest higher time based on current time.</p>
  
  <p>For eg. if the current time is 10:46 AM then the selected value should 11:00 AM and if the current time is 10:31 AM should also default to 11:00 AM.</p>
  
  <p>Any pointers on achieving this using jquery or with normal javascript.</p>
  
  <p>Thanks</p>