# formatDuration

Formats a travel time with short units, for example "18 min", "1 h 5 min"
or "2 d 3 h", as a message to format with the active catalogue. The time is
rounded to the minute, and a day or more drops the minutes. Under half a
minute, and for a time that is negative or not finite, it reads "Under 1
min".

This is a function exported by `@mapcairn/core`, checked against version 0.2.0.

## Signature

```ts
import { formatDuration } from "@mapcairn/core";
 
function formatDuration(seconds: number): Message;
```

## Parameters

- `seconds` (`number`)

## Returns

`Message`

## See also

- [`Message`](https://docs.mapcairn.com/api/core/Message-typealias.md)

Source: [packages/core/src/units/duration.ts:48](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/units/duration.ts#L48)
