MCPcopy Create free account
hub / github.com/Work-Fisher/code-claw / formatTimestamp

Function formatTimestamp

ai-code-studio/src/app/helpers.ts:38–48  ·  view source on GitHub ↗
(value?: string | null)

Source from the content-addressed store, hash-verified

36}
37
38export function formatTimestamp(value?: string | null) {
39 if (!value) return '';
40 const date = new Date(value);
41 if (Number.isNaN(date.getTime())) return '';
42 return new Intl.DateTimeFormat('zh-CN', {
43 month: 'short',
44 day: 'numeric',
45 hour: '2-digit',
46 minute: '2-digit',
47 }).format(date);
48}
49
50export function formatCurrency(value?: number | null) {
51 return value ? `US$${value.toFixed(4)}` : 'US$0.0000';

Callers 7

MessageCardFunction · 0.90
ConversationPaneFunction · 0.90
DiagnosticsPanelFunction · 0.90
SetupWizardFunction · 0.90
SettingsDialogFunction · 0.90
ToolRunDetailFunction · 0.90
LogsPanelFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected