How Can a Reader Check Whether a Trip Runs Today?
From the earlier reference collection. Read the current software blog.
Resolve the correct local service date, check the recurring calendar, then apply any date-specific exceptions before listing a trip.
Resolve “today” locally
“Today” depends on the relevant agency’s local date, not necessarily the date on the reader’s device. A person querying shortly after midnight may still be looking for a trip associated with the previous evening’s service day, especially for overnight schedules. Establish the agency’s time-zone context and clarify whether the query means calendar day or service day.
In GTFS, calendar data describes recurring service patterns and calendar_dates.txt can carry date-specific additions or removals. The reference also explains that service days can extend beyond midnight. [GTFS schedule reference](https://gtfs.org/documentation/schedule/reference/)
Check the recurring service
Find the trip’s service_id, then check whether that service is active for the resolved date. The calendar record can limit the date range and mark the weekdays on which the service normally runs. A trip is not active merely because its route appears in the feed; its referenced service pattern must apply.
As an example, a trip assigned to SATURDAY is not ordinarily active for a Friday date, even if its clock time is 25:10 and the event appears on Saturday morning. The service date determines which calendar pattern to check; the time value indicates when the event occurs relative to that service day.
Apply date-specific exceptions
After checking the baseline, inspect exceptions for the exact service date and service ID. A removal can suppress a normally active weekday service, while an addition can activate a pattern on a date when it would not ordinarily run. The final decision must reflect both the recurring calendar and matching exceptions.
If the feed contains no information for the date, do not infer that the trip runs just because its weekday resembles a normal service day. Report the coverage limitation. Likewise, do not claim an altered holiday pattern unless the feed or another authoritative source supports it.
Return an answer the reader can verify
A helpful result can state “This trip is scheduled for the selected local service date” and identify whether it came from the regular calendar or a date-specific exception. If the event falls after midnight, show its calendar date as well as the service date so the displayed time is not surprising.
A robust check follows the same sequence every time: resolve local date, identify the trip’s service ID, evaluate the recurring calendar, apply exceptions, and then display the trip’s stop events. That makes “runs today” a traceable schedule answer instead of a guess based on the route name or clock alone.