Create your data feed

Service dates & times

Calendar.txt defines different services and shows the available days and times.

calendar.txt
service_id
monday
tuesday
wednesday
thursday
friday
saturday
sunday
start_date
end_date

Example of a simple calendar.txt file:

service_id,monday,tuesday,wednesday,thursday,friday,saturday,sunday,start_date,end_date

WE,0,0,0,0,0,1,1,20201201,20201231

WD,1,1,1,1,1,0,0,20201201,20201231

Service exceptions

You can add service exceptions in the calendar_dates.txt field. Typically, you remove exceptional dates, like holidays, from one service and add them to another. For example, if December 25 falls on a weekday, you might remove the date from the weekday service and add it to the weekend service.

calendar_dates.txt
service_id
date
exception_type

Example of a simple calendar_dates.txt file:

Service_id,date,exception_type

WD,20201225,2

WD,20201226,1

The time periods for calendar_dates.txt and calendar.txt should match. Otherwise, service exceptions can be missed and give users inaccurate information. The service period covered in the feed must be at least 30 days and be consistent for all services.

Need more help?

Try these next steps:

Is there something we can help you with?

Chat with a member of Transit team

Search
Clear search
Close search
Google apps
Main menu
13940386195546900093
true
Search Help Center
true
true
true