-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Make Service.serves_date?/2 use added_stops as a full override (#…
…2248) This accommodates a very specific type of GTFS service, which looks like %Services.Service{ added_dates: ["2024-12-05"], added_dates_notes: %{"2024-12-05" => nil}, description: "Weekday schedule", end_date: ~D[2024-12-04], name: "Weekday", id: "LRV42024-hlb44011-Weekday-01", removed_dates: [], removed_dates_notes: %{}, start_date: ~D[2024-11-27], type: :weekday, typicality: :typical_service, valid_days: [1, 2, 3, 5], rating_start_date: ~D[2024-08-25], rating_end_date: nil, rating_description: "Fall" } The edge case is when the `valid_days` doesn't include the day of the week for the `added_date(s)`. When that happens, the added dates should still be considered served, but the previous version was only handling that correctly if `valid_days` was `[]`.
- Loading branch information
1 parent
282a294
commit 557ce23
Showing
3 changed files
with
25 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters