int res = date1.compareTo(date2),相等则返回0,date1大返回1,否则返回-1。 转载于:https://www.cnblogs.com/caixiaoyou/p/9732849.html