A trip runs on a date if its service is active on it, as in
get_active_services(), so dates outside the period covered by the GTFS
object are skipped. Trips listed in stop_times but not in trips are not
included. Departure times are sorted as times, not as strings, and stop
times with an empty departure_time come last at each stop. Duplicated
rows in trips and stop_times are kept.
Without calendar and calendar_dates tables, no trip runs, and an empty
table is returned. Columns other than trip_id present in both trips and
stop_times (not defined by the GTFS reference) appear twice, the one from
stop_times prefixed with i., and the ones from trips are used to sort
the timetable.
date is the service date: stop times past 24:00:00 happen on the
following calendar day.
Only the exact given stops are included: to include the stops of a station,
pass them with get_children_stops(). The frequencies table is not used:
frequency-based trips appear with the times of their template trips, as
listed in stop_times. To include all their departures, convert them with
frequencies_to_stop_times() first.