Function: timeAgo()
function timeAgo(date: DateParam, options?: TimeAgoOptions): string;
Defined in: lib/util.ts:172
Returns the time elapsed since the given date.
Parameters
| Parameter | Type | Description |
|---|---|---|
date | DateParam | The date from which to calculate elapsed time. |
options | TimeAgoOptions | Formatting options: - 'brief': single-unit format (e.g. "5m", "2h") - 'mini': multi-unit format (e.g. "2m30s", "1h15m") |
Returns
string
The formatted elapsed duration.