MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / formatTimestamp

Function formatTimestamp

packages/mcp-server/src/format.ts:105–112  ·  view source on GitHub ↗
(ts: number)

Source from the content-addressed store, hash-verified

103}
104
105function formatTimestamp(ts: number): string {
106 const d = new Date(ts * 1000)
107 const M = d.getMonth() + 1
108 const D = d.getDate()
109 const h = String(d.getHours()).padStart(2, '0')
110 const m = String(d.getMinutes()).padStart(2, '0')
111 return `${M}/${D} ${h}:${m}`
112}
113
114/**
115 * Format messages as compact plain text with consecutive-sender merging.

Callers 1

flushFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected