UNPKG

s2-tools

Version:

A collection of geospatial tools primarily designed for WGS84, Web Mercator, and S2.

45 lines 1.46 kB
/** * Describes whether service is added or removed on a specific date. * 1 - Service added for this date. * 2 - Service removed for this date. */ export declare enum GTFSExceptionType { Added = 1, Removed = 2 } /** * # Calendar Dates * * **Conditionally Required** * Explicitly activates or disables service on particular dates. * - If used with `calendar.txt`, it modifies the default service patterns. * - If `calendar.txt` is omitted, all service dates must be listed here. */ export declare class GTFSCalendarDate { /** * **Required** * Identifies a set of dates where service exception occurs. * References `calendar.service_id` if used with `calendar.txt`; * or acts as a standalone ID if `calendar.txt` is omitted. */ serviceId: string; /** * **Required** * Date of the service exception, parsed as a JavaScript Date. * Originally in GTFS as a YYYYMMDD string (no time component). */ date: Date; /** * **Required** * Indicates whether service is added (1) or removed (2) on this date. */ exceptionType: GTFSExceptionType; /** @param data - the parsed GTFS CSV data */ constructor(data: Record<string, string>); } /** * @param input - the input string to parse from * @returns - an array of GTFSCalendarDates */ export declare function parseGTFSCalendarDates(input: string): GTFSCalendarDate[]; //# sourceMappingURL=calendarDates.d.ts.map