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

Function formatTime

apps/start/src/utils/date.ts:42–48  ·  view source on GitHub ↗
(date: Date)

Source from the content-addressed store, hash-verified

40}
41
42export function formatTime(date: Date) {
43 return new Intl.DateTimeFormat(getLocale(), {
44 hour: 'numeric',
45 minute: 'numeric',
46 second: 'numeric',
47 }).format(date);
48}
49
50TimeAgo.addDefaultLocale(en);
51const ta = new TimeAgo(getLocale());

Callers 2

FieldValueFunction · 0.90
formatTimeAgoOrDateTimeFunction · 0.70

Calls 1

getLocaleFunction · 0.85

Tested by

no test coverage detected