MCPcopy
hub / github.com/fccview/jotty / formatTimeAgo

Function formatTimeAgo

app/_utils/date-utils.ts:85–88  ·  view source on GitHub ↗
(dateString: string, t?: (key: string, options?: any) => string)

Source from the content-addressed store, hash-verified

83};
84
85export const formatTimeAgo = (dateString: string, t?: (key: string, options?: any) => string): string => {
86 const { unit, value } = getTimeUnitSimple(dateString);
87 return t ? formatWithTranslation(unit, value, t) : formatTimeAgoEnglish(unit, value);
88};
89
90export const generateDateTimeTitle = (): string => {
91 const now = new Date();

Callers 2

SessionCardFunction · 0.90
AuditLogCardFunction · 0.90

Calls 3

getTimeUnitSimpleFunction · 0.85
formatWithTranslationFunction · 0.85
formatTimeAgoEnglishFunction · 0.85

Tested by

no test coverage detected