Skip to content

FormatRelativeUnixOptions

The FormatRelativeUnixOptions type.

import type { FormatRelativeUnixOptions } from "@northguild/gmt/unix/format";
Member Type Description
style? "long" | "short" | "narrow"
numeric? "always" | "auto"
largestUnit? RelativeUnit
roundingMethod? RelativeRoundingMethod
epochUnit? "seconds" | "milliseconds"
reference? string | number
timeZone? string
interface FormatRelativeUnixOptions {
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;
epochUnit?: "milliseconds" | "seconds";
reference?: string | number;
timeZone?: string;
}

unix/format/formatRelativeUnix.ts