public void CheckEventEndTimes() { List <DispensaryEvent> ongoingEvents = eventScheduler.ongoingEvents; foreach (DispensaryEvent dispensaryEvent in ongoingEvents) { // No check for time type incremental, because the incremental methods will handle the ending of the event // No check for time type asNeeded, because the specific things that happen on those events will end the event if (dispensaryEvent.eventTimeType == DispensaryEvent.EventTimeType.custom) { // Means the event has an end date if (!dispensaryEvent.eventEndDate.emptyDate) { // But ill make sure it has an end date just in case if (CompareTime(dispensaryEvent.eventEndDate)) { eventScheduler.EndEvent(dispensaryEvent.eventID); } } else { print("Error: Event was set to custom time type, but had no end date"); } } } }