# RelativeRoundingMethod

Industry: Core

How the `formatRelative*` functions round a fractional distance to a whole number of the unit displayed. It is applied to the signed value, where a past distance is negative: `"floor"` rounds toward negative infinity, `"ceil"` toward positive infinity, and `"round"` to the nearest whole number, a half going toward positive infinity.

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

## Definition

```ts
type RelativeRoundingMethod = "floor" | "ceil" | "round";
```

## Used by

- [`formatRelativeDate`](/gmt/reference/plain/format/formatRelativeDate/)
- [`formatRelativeDateTime`](/gmt/reference/plain/format/formatRelativeDateTime/)
- [`formatRelativeTime`](/gmt/reference/plain/format/formatRelativeTime/)
- [`formatRelativeUnix`](/gmt/reference/unix/format/formatRelativeUnix/)
- [`formatRelativeUtc`](/gmt/reference/utc/format/formatRelativeUtc/)
- [`formatRelativeZoned`](/gmt/reference/zoned/format/formatRelativeZoned/)

## Source

[types/relative-rounding-method.ts](https://github.com/northguild/gmt/blob/main/packages/gmt/src/types/relative-rounding-method.ts)
