Using times on the Android platform
<p>I have a lot of time information in the format of hh:mm and I was wondering if there is a good way to take this information and compare it to the current time. Say I have a list of times for a day and I want to find out which time in this array of strings is the first that has not already passed in this day. </p>

<p>I was looking at the Calendar API and I figured I could break the strings up into hours and minutes by splitting it at the ":" and then create a calendar object from that but that seems rather inefficient. </p>

<p>Just looking for some input; thanks,
Rob </p>

<pre><code>&lt;string-array name="example"&gt;
    &lt;item&gt;6:58&lt;/item&gt;
    &lt;item&gt;7:41&lt;/item&gt;
    &lt;item&gt;8:08&lt;/item&gt;
    &lt;item&gt;8:28&lt;/item&gt;
    &lt;item&gt;8:48&lt;/item&gt;
    &lt;item&gt;9:08&lt;/item&gt;
    &lt;item&gt;9:43&lt;/item&gt;
    &lt;item&gt;10:13&lt;/item&gt;
    &lt;item&gt;10:43&lt;/item&gt;
    &lt;item&gt;11:13&lt;/item&gt;
    &lt;item&gt;11:43&lt;/item&gt;
    &lt;item&gt;12:09&lt;/item&gt;
    &lt;item&gt;12:29&lt;/item&gt;
    &lt;item&gt;12:49&lt;/item&gt;
    &lt;item&gt;1:09&lt;/item&gt;
    &lt;item&gt;1:29&lt;/item&gt;
    &lt;item&gt;1:49&lt;/item&gt;
    &lt;item&gt;2:09&lt;/item&gt;
    &lt;item&gt;2:29&lt;/item&gt;
    &lt;item&gt;2:49&lt;/item&gt;
    &lt;item&gt;3:09&lt;/item&gt;
    &lt;item&gt;3:29&lt;/item&gt;
    &lt;item&gt;3:49&lt;/item&gt;
    &lt;item&gt;4:09&lt;/item&gt;
    &lt;item&gt;4:29&lt;/item&gt;
    &lt;item&gt;4:49&lt;/item&gt;
    &lt;item&gt;5:09&lt;/item&gt;
    &lt;item&gt;5:29&lt;/item&gt;
    &lt;item&gt;5:49&lt;/item&gt;
    &lt;item&gt;6:29&lt;/item&gt;
    &lt;item&gt;7:09&lt;/item&gt;
    &lt;item&gt;7:47&lt;/item&gt;
    &lt;item&gt;8:27&lt;/item&gt;
    &lt;item&gt;9:07&lt;/item&gt;
    &lt;item&gt;9:47&lt;/item&gt;
    &lt;item&gt;10:27&lt;/item&gt;
&lt;/string-array&gt;
</code></pre>
