On September 1, a route that had run on time for years quietly disappeared from Google Maps. No rider complaint triggered it, no dashboard turned red, no email arrived. The feed’s calendar had simply ended on August 31, and nothing in the system was built to say so.
That is GTFS calendar.txt, the General Transit Feed Specification (GTFS) file that breaks quietly. This piece covers how calendar.txt and calendar_dates.txt work together, and how to express holidays and seasonal service inside them. It closes with the expiry problem: a common way a small agency’s feed goes dark with no warning at all.
What Is GTFS calendar.txt?
GTFS calendar.txt is the file that sets a route pattern’s weekly service days and the date range they apply within. It works alongside calendar_dates.txt, which layers single-date exceptions on top, adding or removing specific dates the weekly pattern does not correctly describe. Most feeds need both.
calendar.txt and calendar_dates.txt Together
calendar.txt, per the gtfs.org calendar.txt reference, holds one row per service pattern. Each row has a service_id, a flag for each day of the week the pattern runs, and a start_date and end_date bounding the whole thing. A typical weekday pattern sets Monday through Friday to 1 and weekends to 0, with a date range covering the current schedule period.
calendar_dates.txt, per the gtfs.org calendar_dates.txt reference, references a service_id from calendar.txt. It adds single-date exceptions to it. An exception_type of 1 adds service on a date the weekly pattern would not otherwise include, useful for a special weekend run. A value of 2 removes service on a date the weekly pattern would otherwise include, the usual way to cancel a single weekday for a holiday.
The two files are not alternatives. A weekday pattern in calendar.txt handles the routine case efficiently, one row covering months of normal weekdays, while calendar_dates.txt handles every date that routine pattern gets wrong. Some agencies build a calendar entirely from calendar_dates.txt rows instead, one explicit date at a time with no weekly pattern at all. That works too, and the specification allows it, though it produces a much longer file for a system that mostly runs the same schedule week after week.
For a small agency running one or two route patterns, the weekly-plus-exceptions approach in calendar.txt is almost always the easier file to maintain by hand. A system with dozens of small service variations, common at a larger agency, sometimes finds the all-exceptions approach easier to generate from scheduling software instead, even though it produces far more rows. Neither approach is more correct than the other. The choice is about which one is easier for a specific agency’s tools and staff to keep current.
Holidays
A holiday is a calendar_dates.txt exception: an exception_type=2 row removes the normal weekday on that date, and an exception_type=1 row adds the reduced holiday service, which needs its own service_id. Removing the weekday without adding the replacement produces a valid feed with no trips that day. Holiday service in calendar_dates.txt covers the two-row pattern, snow days, and special events in full.
Seasonal and School Service
Seasonal service works through calendar.txt’s own start_date and end_date, not a stack of individual calendar_dates.txt exceptions. That covers a summer schedule or a route that only runs during a school term. A summer-only pattern gets its own service_id with a date range covering just that season. A separate school-year pattern runs alongside it, its own date range covering the rest of the year. Campus and school route service covers the scheduling patterns specific to a school-tied route in more depth.
The trap here is a gap between two seasonal patterns rather than an overlap. A summer pattern’s end_date and a fall pattern’s start_date need to connect cleanly, either back to back or with an intentional single-day gap for a changeover. Miss that connection, and a rider planning a trip during the unplanned gap sees no scheduled service at all, on a date the agency fully intended to be running normally.
The Expiry Problem
This is the part that matters most. A calendar.txt end_date in the past does not throw an error. The feed still validates. It still sits at its published URL exactly as before. What happens is quieter and worse. Google Maps, Apple Maps, and every other consumer stop showing the route. After its end_date, the feed defines no service at all, so there is nothing for a trip planner to show.
Nobody gets told. There is no dashboard alert, no failed build, no rejected submission. The first sign is almost always a rider who cannot find a route that used to be there. That complaint arrives days or weeks after the actual expiry date, well after the quiet failure already happened. Common GTFS validation errors covers this same failure from the validator’s side. An expiring feed shows up only as a warning, never an error, precisely because it is technically valid right up until the moment it silently is not.
The timing works against an agency too. The route vanishes on the first day after the end_date, but the first complaint can take days or weeks to reach whoever maintains the feed. By then that person has moved on to the next task. Nothing links the complaint back to a date that quietly passed weeks earlier.
How Far Ahead Should Your Calendar Run?
Far enough that nobody has to remember to extend it on a specific day. A calendar that ends the same week someone happens to renew it is one missed week away from the exact failure described above. A buffer of at least 90 days past the next known schedule change gives most renewal cadences enough room to catch it before expiry. Extend end_date well past the next planned schedule change. Then treat that renewal as a recurring task tied to every schedule update, not a one-time fix. Calendar renewal in a schedule change workflow covers building that renewal into a routine update, rather than a separate reminder someone has to remember on their own.
FAQ
What Is the Difference Between calendar.txt and calendar_dates.txt?
calendar.txt defines a weekly pattern with a start and end date. calendar_dates.txt adds single-date exceptions on top of that pattern. It can add service on a date the pattern would not otherwise cover, or remove it on a date the pattern would otherwise include.
Can I Build a GTFS Calendar Using Only calendar_dates.txt?
Yes. The specification allows a feed to define every service date individually through calendar_dates.txt with no calendar.txt weekly pattern at all. It works well for genuinely irregular service and produces a much longer file for a system running a consistent weekly schedule.
What Happens When a GTFS Feed’s Calendar Expires?
Nothing throws an error. The feed still validates and still sits at its published URL. Consumers like Google Maps and Apple Maps simply stop displaying the route, since the feed defines no service after its end date. No notification tells the agency this happened.
How Do I Add a Holiday Schedule in GTFS?
Remove the normal weekday pattern for that date using an exception_type=2 row in calendar_dates.txt. If a reduced or alternate schedule runs instead of no service, add it back with a separate service_id and an exception_type=1 row for the same date.
Why Did My Routes Disappear From Google Maps With No Error?
A common cause is an expired calendar.txt end date. The feed still passes validation, but it defines no service after that date. So the route quietly stops appearing the day after the expiry date, with no message sent to the agency.
Talk to Us About Your GTFS
TransitFare is a transit technology company founded in 2012 that builds GTFS publishing tools for small and mid-sized transit agencies running 10 to 50 vehicles. The expiry problem covered above is one of the most preventable GTFS failures. TransitFare Cloud publishes a rolling 90-day window and regenerates the feed every month, so the end date moves forward without anyone having to remember it. Talk to us about your GTFS, or start with calendar renewal in a schedule change for the rest of what a schedule change touches. For what an expired calendar costs once consumers act on it, see GTFS feed delisting.