title: Android - How to determine of time object is between two other time objects?
body: <p>How can I determine if the current time is between two other time objects?</p>
  
  <p>For example: current: 15:23, startTime: 22:00, endTime: 06:00. So the current time is not between this two other times, but this "23:47" is.</p>
  
  <p>*I don't care about the date only the time</p>
  
  <p>I tried to do it like this:</p>
  
  <pre><code>Time startTime = getStartTime();
  Time endTime = getEndTime();
  
  Calendar c = Calendar.getInstance();
  Time now = new Time(c.getTimeInMillis());
  
  if (now.before(endTime) &amp;&amp; now.after(startTime)) {
      return true;
  }
  
  return false;
  </code></pre>
  
  <p>but it dosen't work well. their aren't any error but it just dosen't work.</p>
  
  <p>To be more precise the problem is that 15:35.after(22:00) return true... and I don't know why.
  I think that the problem is something with the dates but I don't know what</p>