java Date比较

package com.horizon.test;

import org.apache.commons.lang.time.DateUtils;

public class Hello3 {
    public static void main(String[] args) {
        java.sql.Date date=new java.sql.Date(new java.util.Date().getTime());
        java.util.Date date_temp = DateUtils.addMinutes(date, 30);
        java.util.Date date_temp2 = new java.util.Date();

        System.out.println(date_temp2.before(date_temp));
    }
}

 

posted @ 2013-08-16 15:35  horizon~~~  阅读(301)  评论(0编辑  收藏  举报