T
UseTimeAgoFormatter
testeddemoFormatter for a single unit value. Receives the rounded numeric value and whether the instant is in the past, and returns the localized fragment.
Demo
Loading demo…
Signature
ts
export type UseTimeAgoFormatter<T = number> = (value: T, isPast: boolean) => string;Type Parameters
T= number