fix(Dotcom.ServicePatterns): better date handling#3196
Open
thecristen wants to merge 1 commit into
Open
Conversation
Instead of using service start/end dates, use all dates (as added_dates may and will fall outside of the supposed start/end range). This impacts the displayed text for planned disruptions, impacts how we determine which services are identical (having the same dates), and impact how we identify whether a service is entirely in the past.
lvachon1
approved these changes
May 21, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope
Slack thread
The schedule picker was showing
Sunday (modified service)as concluding on May 31 instead of on June 7.Implementation
The service in question: https://api-dev-blue.mbtace.com/services/PRIV20262-hpa26sp7-Sunday-01
While the service's end_date was May 31, it also had an added_date of June 7.
Instead of using service start/end dates, this PR more consistently uses all dates (as
added_datesmay and will fall outside of the supposed start/end range). This impactsScreenshots
How to test
Visit the 716 route (and probably others, but this one was clear) and view departures from any stop with data from api-dev-blue.
Sunday service should not be labelled as ending May 31.