-
Notifications
You must be signed in to change notification settings - Fork 16
Description
The current methods for looking up trains do not prefer trains whose calendar starts today, resulting in holidays getting incorrect trains. The new schedule has a holiday on Washington's Birthday, February 16, 2015. If you set your date to this, the trains you get are the regular weekday trains, since the trains for the holiday are at the end of the trips list.
I think the best way to fix this would be to do a search through the calendars (since that list is much much shorter than the trips list), looking for the calendar whose start date is closest to the current date. Then use that calendar when searching for trains (maybe have a trips file indexed by calendar, and then use that subset of trips in place of the full trips list? could probably then dump the full list, so your resource usage won't increase noticeably. Side benefit of reducing runtime memory usage, since you no longer need the full trips list in memory)