Skip to main content

formatTimestamp()

const formatTimestamp: (timestamp) => string;

Formats a timestamp into a relative string (e.g., "Just now", "2h ago", "5d ago").

Parameters

ParameterTypeDescription
timestampstringThe timestamp string to format.

Returns

string

A formatted relative time string.