isValidGtfsTime
Signature
Section titled “Signature”isValidGtfsTime(value: string): booleanChecks a GTFS Schedule Time value, including one past 24:00:00.
- True for
H:MM:SS,HH:MM:SSandHHH:MM:SSwith hours 0–999 and minutes and seconds00–59. 25:35:00is valid: 1:35 on the following day, still on the same service day.- Nothing is trimmed, so a space or newline makes it false; an empty field is false.
- True exactly when
parseGtfsTimereturns a value: both read the value with one internal core. Source: GTFS Schedule Reference § Field Types, Time.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value | string | A GTFS Time field, such as frequencies.txt start_time. |
Returns
Section titled “Returns”true when value is a GTFS time, or false on invalid input
Examples
Section titled “Examples”import { isValidGtfsTime } from "@northguild/gmt/rail/validate";
isValidGtfsTime("25:35:00") // trueSource
Section titled “Source”© 2026 NorthGuild · Licences
Code examples: MIT-0. Packages: MIT. Third-party data and components: their own licences, credited where they appear. Everything else: © 2026 NorthGuild, all rights reserved.