Posted By

multani on 02/23/08


Tagged

time java comparation


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

zdroshnya
rtipton
vkolev


Time comparation in Java


 / Published in: Java
 

URL: http://dev.csdn.net/article/68/68912.shtm

  1. public static boolean isDateBefore(String date1,String date2){
  2. try{
  3. DateFormat df = DateFormat.getDateTimeInstance();
  4. return df.parse(date1).before(df.parse(date2));
  5. }catch(ParseException e){
  6. System.out.print("[SYS] " + e.getMessage());
  7. return false;
  8. }
  9. }

Report this snippet  

You need to login to post a comment.