Пример #1
0
            # only append if it is a Saturday, add the corresponding Sunday
            if (datetime.datetime.weekday(day)==5):
                self.outboundDateList.append(day)
                self.returnDateList.append(day + datetime.timedelta(days= 1))

        return

    def GetAirportList(self):
        return self.airportList

    def GetFlightDateList(self):
        return [self.outboundDateList, self.returnDateList]

if __name__ == "__main__":
    from ListGenerators import *
    listGenerator = ListGenerators()

    listGenerator.GenerateAirportList()
    airportList = listGenerator.GetAirportList()

    print "Airport List: "
    print airportList

    startSearch_days = 60
    duration_days = 30
    listGenerator.GenerateFlightDateList(startSearch_days, duration_days)
    flightDateList = listGenerator.GetFlightDateList()

    print "Outbound Date List: "
    print flightDateList[0]