MCPcopy Create free account
hub / github.com/0opslab/opslabJutil / calculate

Method calculate

src/main/java/com/opslab/helper/DateHelper.java:763–772  ·  view source on GitHub ↗

时间Date在时间段(例如每天的08:00-18:00)上增加或减去second秒 @param date @param second @param timeBurst @return 计算后的时间 @Suumary 指定的格式错误后返回原数据

(String date, int second, String timeBurst)

Source from the content-addressed store, hash-verified

761 * @Suumary 指定的格式错误后返回原数据
762 */
763 public static Date calculate(String date, int second, String timeBurst) {
764 Date start = null;
765 try {
766 start = DateTimeInstance().parse(date);
767 return calculate(start, second, timeBurst);
768 } catch (ParseException e) {
769 e.printStackTrace();
770 }
771 return new Date();
772 }
773
774 /**
775 * 时间Date在时间段(例如每天的08:00-18:00)上增加或减去second秒

Callers 2

testCalculate23Method · 0.95
testCalculateMethod · 0.95

Calls 6

DateTimeInstanceMethod · 0.95
DateInstanceMethod · 0.95
subtractMethod · 0.95
dayMethod · 0.95
equalsMethod · 0.80
addMethod · 0.45

Tested by 2

testCalculate23Method · 0.76
testCalculateMethod · 0.76