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));

    }

}

 

你可能感兴趣的:(java)