Skip to content

FormatRelativeUtcOptions

The FormatRelativeUtcOptions type.

import type { FormatRelativeUtcOptions } from "@northguild/gmt/utc/format";
Member Type Description
style? "long" | "short" | "narrow"
numeric? "always" | "auto"
largestUnit? RelativeUnit
roundingMethod? RelativeRoundingMethod
reference? string
timeZone? string
interface FormatRelativeUtcOptions {
style?: "long" | "short" | "narrow";
numeric?: "always" | "auto";
largestUnit?: RelativeUnit;
/**
* How the computed distance rounds to the display unit: "floor" rounds toward the
* earlier boundary, "ceil" toward the later boundary, "round" (default) to the nearest —
* matches current behavior when omitted.
*/
roundingMethod?: RelativeRoundingMethod;
reference?: string;
timeZone?: string;
}

utc/format/formatRelativeUtc.ts