UNPKG

s2-tools

Version:

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

48 lines 1.75 kB
/** * # Timeframes * * **Optional** * Describes fare variations based on time of day, day of week, or specific dates. * Timeframes can be associated with fare products in `fare_leg_rules.txt`. * There must be no overlapping [start_time, end_time) intervals for the same * `timeframe_group_id` and `service_id`. */ export declare class GTFSTimeframe { /** * **Required** * Identifies a timeframe (or set of timeframes). */ timeframeGroupId: string; /** * **Conditionally Required** * Beginning of a timeframe in HH:MM:SS format (<= 24:00:00). * The interval **includes** this time. * - If `end_time` is defined, `start_time` is required. * - If `end_time` is absent, `start_time` must be absent. * - If `start_time` is empty in the CSV, it is considered `00:00:00`. */ startTime?: string; /** * **Conditionally Required** * End of a timeframe in HH:MM:SS format (<= 24:00:00). * The interval **excludes** this time. * - If `start_time` is defined, `end_time` is required. * - If `start_time` is absent, `end_time` must be absent. * - If `end_time` is empty in the CSV, it is considered `24:00:00`. */ endTime?: string; /** * **Required** * Identifies a set of dates (`calendar.service_id` or `calendar_dates.service_id`) * when this timeframe is in effect. */ serviceId: string; /** @param data - the parsed GTFS CSV data */ constructor(data: Record<string, string>); } /** * @param input - the input string to parse from * @returns - an array of Timeframes */ export declare function parseGTFSTimeframes(input: string): Record<string, GTFSTimeframe>; //# sourceMappingURL=timeframes.d.ts.map