public static double next_end_tm(double tm_now, Variant tmchk, double firstracttmt = 0.0, double combracttm = 0.0) { bool flag = !ConfigUtil.check_tm(tm_now, tmchk, firstracttmt, combracttm); double result; if (flag) { result = 0.0; } else { double num = 0.0; bool flag2 = tmchk.ContainsKey("tb") && tmchk.ContainsKey("te"); if (flag2) { Variant variant = tmchk["te"]; TZDate tZDate = TZDate.createByYMDHMS(variant["y"], variant["mon"] - 1, variant["d"], variant["h"], variant["min"], variant["s"], 0); num = tZDate.time; } else { bool flag3 = tmchk.ContainsKey("dtb") && tmchk.ContainsKey("dte"); if (flag3) { Variant variant2 = tmchk["dte"]; TZDate tZDate2 = TZDate.createByYMDHMS((int)tm_now, 0, 0, 0, 0, 0, 0); tZDate2.setHours(variant2["h"], variant2["min"], variant2["s"], 0); num = tZDate2.time; } } result = num; } return(result); }
public static double next_start_tm(double tm_now, Variant tmchk, double firstopentm) { bool flag = ConfigUtil.check_tm(tm_now, tmchk, firstopentm, 0.0); double result; if (flag) { result = 0.0; } else { bool isArr = tmchk.isArr; if (isArr) { double num = 0.0; foreach (Variant current in tmchk._arr) { double num2 = ConfigUtil.next_start(tm_now, current, firstopentm); bool flag2 = num2 > 0.0; if (flag2) { bool flag3 = 0.0 == num; if (flag3) { num = num2; } else { bool flag4 = num > num2; if (flag4) { num = num2; } } } } result = num; } else { result = ConfigUtil.next_start(tm_now, tmchk, firstopentm); } } return(result); }