MCPcopy Create free account
hub / github.com/Gan-Xing/CodexBridge / formatCommandTimestamp

Function formatCommandTimestamp

src/core/bridge_coordinator.ts:21371–21383  ·  view source on GitHub ↗
(value: number, locale: SupportedLocale)

Source from the content-addressed store, hash-verified

21369}
21370
21371function formatCommandTimestamp(value: number, locale: SupportedLocale): string {
21372 return new Intl.DateTimeFormat(locale === 'zh-CN' ? 'zh-CN' : 'en-US', {
21373 year: 'numeric',
21374 month: '2-digit',
21375 day: '2-digit',
21376 hour: '2-digit',
21377 minute: '2-digit',
21378 second: '2-digit',
21379 hour12: false,
21380 timeZone: 'UTC',
21381 timeZoneName: 'short',
21382 }).format(new Date(value));
21383}
21384
21385function formatErrorMessage(error: unknown): string {
21386 if (error instanceof Error && error.message) {

Callers 1

handleWeiboCommandMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected