标签:exception EDA compare work color compareto 判断 led return
1 /** 2 * 判断签到时间和工作时间的关系 3 * 4 * @param signTime 签到时间 5 * @param workTime 设置时间 6 * @return 0 :signTime和workTime时间相同 7 * 1 :signTime比workTime时间大 8 * -1:signTime比workTime时间小 9 * @throws ParseException 10 */ 11 public static boolean compareDate(String signTime, String workTime) throws ParseException { 12 SimpleDateFormat format = new SimpleDateFormat("HH:mm:ss"); 13 Date signChange = format.parse(signTime); 14 Date workTime1 = format.parse(workTime); 15 int ret = signChange.compareTo(workTime1); 16 if (ret == 1) { 17 return false; 18 } else { 19 return true; 20 } 21 }
标签:exception EDA compare work color compareto 判断 led return
原文地址:https://www.cnblogs.com/mzc--/p/12161807.html