UNPKG

@northguild/gmt

Version:

Date and time library for JavaScript and TypeScript, built on TC39 Temporal: time zones, DST, business days, ISO 8601 strings in and out. Never throws.

17 lines • 819 B
/** * A GTFS Schedule `Time` value split into the whole days past the service day and the seconds left * over. * * - `25:35:00` is `{ seconds: 5700, dayOverflow: 1 }`: 1:35 on the day after the service day, * still part of that service day. * - `dayOverflow × 86400 + seconds` is the elapsed seconds from noon minus 12 h of the service * day, which GTFS measures every time from. It matches the wall clock only when no clock change * falls between that anchor and the time; turning it into an instant needs the service date and * the agency's zone. */ export 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; }