Skip to content

GtfsTime

  • Public transport timetables in GTFS feeds, where a stop time runs past midnight and still belongs to the service day its trip began on.

A GTFS Schedule Time value split into the whole days past the service day and the seconds left over.

import type { GtfsTime } from "@northguild/gmt";
MemberTypeDescription
secondsnumberThe written time less whole 24-hour blocks: an integer from 0 to 86399.
dayOverflownumberThe whole days past the service day: 0 up to 23:59:59, 1 from 24:00:00, and so on.
interface GtfsTime {
/** The written time less whole 24-hour blocks: an integer from 0 to 86399. */
seconds: number;
/** The whole days past the service day: 0 up to `23:59:59`, 1 from `24:00:00`, and so on. */
dayOverflow: number;
}

types/gtfs.ts

© 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.