Relative time

A <time>that is safe to hydrate: the server and the first client paint show the absolute date pinned to UTC, the mount effect switches to a relative label in the browser's zone. Older than absoluteAfterDays (default 7) stays absolute. Provenance renders through it.

import { RelativeTime } from "@stocklots/ui-components/components/relative-time";

<RelativeTime date={order.createdAt} locale={locale} />

Ages

Clock fixed at 2026-09-19 12:00 UTC. Hover for the absolute stamp.

30 seconds ago
3 hours ago
yesterday
6 days ago
past the 7-day cutoff → absolute

Locale and zone

locale="nl" · timeZone="Europe/Amsterdam" with absoluteAfterDays=0