title: Check if a given time lies between two times regardless of date
body: <p>I have timespans:</p>
  <blockquote>
  <p>String time1 = 01:00:00</p>
  <p>String time2 = 05:00:00</p>
  </blockquote>
  <p>I want to check if <strong>time1</strong> and <strong>time2</strong> both lies between <code>20:11:13 and 14:49:00</code>.</p>
  <p>Actually, <code>01:00:00</code> is greater than <code>20:11:13</code> and less than <code>14:49:00</code> considering <code>20:11:13</code> is always less than <code>14:49:00</code>. This is given prerequisite.</p>
  <p>So what I want is, <code>20:11:13 &lt; 01:00:00 &lt; 14:49:00</code>.</p>
  <p>So I need something like that:</p>
  <pre><code> public void getTimeSpans()
  {
      boolean firstTime = false, secondTime = false;
      
      if(time1 &gt; &quot;20:11:13&quot; &amp;&amp; time1 &lt; &quot;14:49:00&quot;)
      {
         firstTime = true;
      }
      
      if(time2 &gt; &quot;20:11:13&quot; &amp;&amp; time2 &lt; &quot;14:49:00&quot;)
      {
         secondTime = true;
      }
   }
  </code></pre>
  <p>I know that this code does not give correct result as I am comparing the string objects.</p>
  <p>How to do that as they are the timespans but not the strings to compare?</p>