如果我理解正确,则需要根据关闭时间是在开放时间的同一天(9-17)还是在隔天的开放时间(22-5)做出两种选择。
它可能只是:
public static boolean isOpen(LocalTime start, LocalTime end, LocalTime time) { if (start.isAfter(end)) { return !time.isBefore(start) || !time.isAfter(end); } else { return !time.isBefore(start) && !time.isAfter(end); }}


