query/calendar

Service and ServiceException Query Functions

These functions query the gtfs_calendar and gtfs_calendar_dates tables in the Right Track Database.

Source:

Methods

(inner) getService(db, id, callback)

Source:

Get the Service(s) specified by Service ID(s) from the passed database. The Service will also include any included Service Exceptions for the Service.

Parameters:
Name Type Description
db RightTrackDB

The Right Track Database to query

id String | Array.<String>

Service ID or list of Service IDs

callback function

Callback function

Properties
Name Type Description
error Error

Database Query Error

service Service | Array.<Service>

The selected Service(s)

(inner) getServiceExceptions(db, date, callback)

Source:

Get the Service Exceptions in effect on the specified date. This includes Services that are either added or removed on the specified date.

Parameters:
Name Type Description
db RightTrackDB

The Right Track Database to query

date int

The date to query (yyyymmdd)

callback function

Callback function

Properties
Name Type Description
error Error

Database Query Error

services Array.<ServiceException>

The selected Service Exceptions

(inner) getServicesDefault(db, date, callback)

Source:

Get the default Services in effect on the specified date. These services don't include any changes due to service exceptions.

Parameters:
Name Type Description
db RightTrackDB

The Right Track Database to query

date int

The date to query (yyyymmdd)

callback function

Callback function

Properties
Name Type Description
error Error

Database Query Error

services Array.<Service>

The selected Services

(inner) getServicesEffective(db, date, callback)

Source:

Get the Services in effect on the specified date. This includes any exceptions found in the calendar_dates file.

Parameters:
Name Type Description
db RightTrackDB

The Right Track Database to query

date int

The date to query (yyyymmdd)

callback function

Callback function

Properties
Name Type Description
error Error

Database Query Error

services Array.<Service>

The selected Services