# GtfsTime

Industry: Rail

:::caution[Unreleased]
Not in `@northguild/gmt` 1.21.0 on npm yet. It is on `main` and ships in the next release.
:::

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

```ts
import type { GtfsTime } from "@northguild/gmt";
```

## Members

| Member | Type | Description |
| --- | --- | --- |
| `seconds` | `number` | The written time less whole 24-hour blocks: an integer from 0 to 86399. |
| `dayOverflow` | `number` | The whole days past the service day: 0 up to `23:59:59`, 1 from `24:00:00`, and so on. |

## Definition

```ts
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;
}
```

## Used by

- [`formatGtfsTime`](/gmt/reference/rail/format/formatGtfsTime/)
- [`parseGtfsTime`](/gmt/reference/rail/parse/parseGtfsTime/)

## Source

[types/gtfs.ts](https://github.com/northguild/gmt/blob/main/packages/gmt/src/types/gtfs.ts)
