Closed redfern314 closed 5 years ago
For departures, works great. For sorting by arrival time with multiple dates, it's kinda weird when the arrival time is the next day. That's actually what it was doing before too, though. A potential fix could be to see if the arrival time is before the departure time and then add 24 hours to it because it's (likely? definitely?) an indication that the arrival date is the next day? Really only helpful for sorting because the human looking at the data likely knows what he's looking at.
At some point, trying to cover all of the bases, though, is probably a little nuts. What you've got here does, indeed, fix the sorting ambiguity with multiple departure dates.
I think I'll call this good for now. Agree it's a little weird for arrival, but I'll wait until someone raises an issue for it before I try to solve it. Thanks for testing!
@jipis - want to try this branch out (re: #3) and let me know if this resolves your issue?
Sample queries:
python southwest.py -a SFO -d PDX -t 2019-05-05 2019-05-06 -s depart_date -l
python southwest.py -a SFO -d PDX -t 2019-05-05 2019-05-06 -s depart_date depart_time -l
python southwest.py -a SFO -d PDX -t 2019-05-05 2019-05-06 -s depart_date depart_time fares -l
python southwest.py -a SFO -d PDX -t 2019-05-05 2019-05-06 -s depart_date depart_time fares -l --reverse