1 package com
.interrupt
.util
;
3 import java
.text
.ParseException
;
4 import java
.text
.SimpleDateFormat
;
7 public class DateUtil
{
10 private static String format_s
= null;
11 private static SimpleDateFormat dformat
= null;
14 format_s
= "MM/dd/yyyy HH:mm:ss z";
15 dformat
= new SimpleDateFormat( format_s
);
19 public static boolean before( String before_s
, String after_s
) {
22 boolean isbefore
= false;
27 date1
= dformat
.parse( before_s
);
28 date2
= dformat
.parse( after_s
);
30 isbefore
= date1
.before(date2
);
33 catch( ParseException e
) {
41 public static boolean after( String after_s
, String before_s
) {
44 boolean isbefore
= false;
49 date1
= dformat
.parse( after_s
);
50 date2
= dformat
.parse( before_s
);
52 isbefore
= date1
.after(date2
);
55 catch( ParseException e
) {
64 public static boolean equals( String date_1
, String date_2
) {
67 boolean isequals
= false;
72 date1
= dformat
.parse( date_1
);
73 date2
= dformat
.parse( date_2
);
75 isequals
= date1
.equals(date2
);
78 catch( ParseException e
) {