The Thursday before a holiday, someone opens the feed to make sure the buses run reduced service on the holiday itself. The quick fix is tempting: edit the weekday pattern in calendar.txt, flip a day off, save, publish. It works for the holiday. It also silently rewrites what the feed says about every past and future instance of that weekday, because a weekly pattern has no memory of a single date.

That is a common holiday feed mistake, and the right tool avoids it entirely. GTFS calendar_dates.txt exists precisely so a single date can be changed without touching the weekly pattern underneath it. This piece covers what calendar_dates.txt does that calendar.txt cannot, and how exception_type 1 and 2 add and remove service. It then covers the best-practice pattern for a holiday, how to model a one-off special event or snow day, and how far ahead to publish so apps show the change in time.

Why Does GTFS calendar_dates.txt Exist Alongside calendar.txt?

GTFS calendar_dates.txt records exceptions to the weekly service pattern: it adds or removes service on specific named dates. calendar.txt defines a repeating weekly schedule with a date range, but it cannot express a single holiday, a snow day, or a one-off special event without a rebuild. calendar_dates.txt handles exactly those dates.

exception_type 1 and 2, Precisely

Every row in calendar_dates.txt names a service_id, a date, and an exception_type. The two exception types are the whole vocabulary:

  • exception_type=1 adds service. On the named date, the referenced service_id runs, even if its weekly pattern in calendar.txt would not otherwise include that day. This is how a special Saturday-level run gets added to a date, or how a holiday-only service gets switched on.
  • exception_type=2 removes service. On the named date, the referenced service_id does not run, even if its weekly pattern would otherwise include that day. This is how a normal weekday gets cancelled for a holiday.

There is a second, entirely valid way to use the file. A feed can skip calendar.txt altogether and define every single service date as an exception_type=1 row. That works, and the calendar.txt basics piece covers when the all-exceptions approach makes sense. Most small agencies run a steady weekly schedule. For them, the weekly pattern plus a short list of exceptions is far easier to keep current than an explicit row for every operating day of the year.

The Best-Practice Pattern for a Holiday

A holiday is almost never just “no service.” Most agencies run something on the holiday: a Sunday-level schedule, a reduced weekday, a shortened span of hours. Modeling that correctly takes two rows, not one.

First, remove the normal service. Add an exception_type=2 row for the holiday date against the weekday service_id, so the ordinary weekday pattern does not run. Second, add the holiday service. Define a separate service_id for the reduced schedule, then add it on the holiday date with an exception_type=1 row. The result is precise: the normal weekday is gone, and the holiday service is present, on that one date, with the weekly pattern untouched.

Skipping the second row is the failure that reaches riders. Remove the weekday without adding a replacement, and the date has no scheduled trips at all. The feed still validates. It is simply a day the trip planner shows nothing, which riders read as “the app is broken” rather than “reduced service today.” Because most agencies observe the same holidays every year, a holiday calendar built carefully once tends to hold. The place it slips is a floating holiday that lands on a different date each year. It gets quietly missed the first time nobody remembers to move the exception.

Example: two rows for one holiday service_id date exception_type weekday Removes the usual 20260703 2 holiday_reduced Adds reduced service 20260703 1 Friday, July 3 weekday Not running holiday_reduced Runs instead
Two rows per holiday: exception_type 2 removes the weekday, exception_type 1 adds the holiday service

Modeling a One-Off Special Event or Snow Day

A special event is the mirror image of a holiday. Instead of removing service, it usually adds it. A parade, a fair, or a game night that needs extra runs gets a dedicated service_id for the event trips, switched on with an exception_type=1 row on the event date. The base weekly pattern keeps running underneath, so the event service is genuinely additive.

A snow day is the harder case because it is unplanned. Say the decision comes at 5 a.m. that only a reduced network will run. The feed change is the same shape as a holiday. exception_type=2 rows remove the trips that will not operate, and an exception_type=1 row can switch on a reduced-service service_id if one is prepared. The difference is time. A holiday is known months out, while a snow day gives an agency only a couple of hours. That short window is why a pre-built reduced-service service_id sitting ready in the feed turns a scramble into a two-row edit.

A durable reroute is different again. A construction detour that lasts weeks belongs in a proper schedule change, not a schedule exception, with rider messaging from the detour communication playbook alongside it. The schedule change workflow explains where that line sits.

How Far Ahead Should Holidays Be Published?

Far enough ahead that consumers re-crawl the feed before the date arrives. Google Maps, Apple Maps, and the transit apps riders use pull a published feed on their own cadence, sometimes daily and sometimes less often. A holiday exception added the night before may not reach riders in time to matter. Publishing the exception well in advance, alongside the rest of the schedule, gives every consumer room to refresh at least once before the holiday.

There is a second reason to publish early that is easy to overlook. An exception added months ahead becomes part of the routine schedule review rather than a separate reminder someone has to act on under time pressure. The whole year’s known holidays can be entered once, at the start of a service period, and validated as a set. Reserve the last-minute edit for the genuinely unpredictable date, the snow day, rather than the fixed holidays that were knowable all along. For where the feed lives and how reliably it reaches those consumers, the feed hosting and uptime piece covers the delivery side.

Where This Differs From Seasonal Service

Exceptions are for individual dates. When an agency runs two full timetables that each span months, a summer schedule and a winter one, that is not a stack of calendar_dates.txt rows. It is overlapping service_id ranges in calendar.txt, covered in seasonal and multi-period service. And when trips are chained across a single vehicle, the way an exception day cancels or keeps a whole block matters, which GTFS interlining explains. The rule of thumb: a handful of dates is a calendar_dates.txt job, and a whole season is a calendar.txt job.

Where TransitFare Fits

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. Managing a holiday calendar well is mostly discipline: use exceptions instead of rewriting the weekly pattern, pair every removal with the replacement service, and enter the year’s holidays once instead of firefighting each one. TransitFare Cloud publishes GTFS, including calendar_dates.txt exceptions, and a software-only rollout typically takes about 4 weeks. The platform has more than 13 years in production, 60 million+ fare validations processed, and a strong production reliability record. The agencies that keep holidays right are the ones that stopped editing calendar.txt to fake one.

Start with what GTFS is for the full file map, or the calendar.txt basics for the weekly pattern this file sits on top of.

FAQ

What Is the Difference Between calendar.txt and calendar_dates.txt?

calendar.txt defines a repeating weekly service pattern with a start and end date. calendar_dates.txt records exceptions to that pattern on specific dates, adding or removing service. Holidays, snow days, and one-off events belong in calendar_dates.txt, not in an edit to the weekly pattern.

How Do I Add a Holiday Schedule Using calendar_dates.txt?

Use two rows. Add an exception_type=2 row on the holiday date against the weekday service_id to remove normal service. Then add an exception_type=1 row for a separate holiday service_id to switch on the reduced schedule. The weekly pattern stays untouched.

What Do exception_type 1 and 2 Mean?

exception_type=1 adds service on the named date even if the weekly pattern would not include it. exception_type=2 removes service on the named date even if the weekly pattern would include it. Every calendar_dates.txt row uses one of the two.

How Do I Handle a Snow Day in GTFS?

Treat it like a holiday made under time pressure. Use exception_type=2 rows to remove trips that will not run, and switch on a pre-built reduced-service service_id with an exception_type=1 row. Preparing that reduced service in advance turns a snow day into a small edit.

How Far Ahead Should I Publish Holiday Exceptions?

Well before the date, because consumers re-crawl a feed on their own schedule and an exception added the night before may not reach riders in time. Entering the year’s holidays at the start of a service period is safer than adding each one individually.