| | |
| | | } |
| | | } |
| | | |
| | | public static boolean isInteger(String str) { |
| | | try { |
| | | double value = Double.parseDouble(str); |
| | | if (value == Math.ceil(value)) { |
| | | return true; |
| | | } |
| | | } catch (Exception e) { |
| | | return false; |
| | | } |
| | | |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * Description: 获得字符(byte)的实际长度<br> |
| | |
| | | if (cycles > 0) { |
| | | Calendar endCalender = Calendar.getInstance(); |
| | | endCalender.setTime(endTime); |
| | | if (StringUtil.isNumber(cyclesStr)) { |
| | | if (StringUtil.isInteger(cyclesStr)) { |
| | | endCalender.add(Calendar.MONTH, new Double(cycles).intValue()); |
| | | } else { |
| | | int hours = new Double(cycles * DateUtil.getCurrentMonthDay() * 24).intValue(); |