MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / timeAgo

Function timeAgo

apps/start/src/utils/date.ts:53–55  ·  view source on GitHub ↗
(date: Date, style?: FormatStyleName)

Source from the content-addressed store, hash-verified

51const ta = new TimeAgo(getLocale());
52
53export function timeAgo(date: Date, style?: FormatStyleName) {
54 return ta.format(new Date(date), style);
55}
56
57export function formatTimeAgoOrDateTime(date: Date) {
58 if (Math.abs(differenceInHours(date, new Date())) < 3) {

Callers 4

ColumnCreatedAtFunction · 0.90
VerifyListenerFunction · 0.90
MetricValueFunction · 0.90
formatTimeAgoOrDateTimeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected