public bool hasFlightAtTime(FlightTime time, String day) { // returns true if time given is before flight if (this.departure.compareFlightTime(time) <= 0) { if (time.nextDay) { return(daysFlying[FlightTime.indexForDayByAddingDays(day, 1)]); } else { return(daysFlying[FlightTime.indexForDay(day)]); } } else { return(false); } }
public static String dayByAddingDays(String day, int days) { return(FlightTime.days[FlightTime.indexForDayByAddingDays(day, days)]); }