warning to avoid time in future in Java
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/4650753/warning-message-pop-out-for-date-time">warning message/pop out for date/time</a>  </p>
</blockquote>



<p>I have a form where a user need to enter date and time (2 different fields) and the time cannot be in future. It can either be current time or time in past only to 12 hours before. So I want to add a warning message when the time is older than 12 hours. How will be the calculation of this in Java. Please help me out!</p>
