MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / fmtAbsoluteTime

Function fmtAbsoluteTime

dashboard/lcm/src/helpers.ts:48–56  ·  view source on GitHub ↗
(epoch: any)

Source from the content-addressed store, hash-verified

46}
47
48export function fmtAbsoluteTime(epoch: any): string {
49 const v = Number(epoch);
50 if (!v) return "";
51 try {
52 return new Date(v * 1000).toLocaleString();
53 } catch (e) {
54 return String(epoch);
55 }
56}
57
58export function escapeRegExp(s: any): string {
59 return String(s || "").replace(/[.*+?^${}()|[\]\\]/g, "\\$&");

Callers 2

TimeTextFunction · 0.90
MessageDetailFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected