MCPcopy Create free account
hub / github.com/astercloud/aster / formatDate

Function formatDate

studio/src/lib/utils.ts:53–61  ·  view source on GitHub ↗
(dateStr: string)

Source from the content-addressed store, hash-verified

51
52// Format date
53export function formatDate(dateStr: string): string {
54 const date = new Date(dateStr);
55 return date.toLocaleDateString('zh-CN', {
56 month: 'short',
57 day: 'numeric',
58 hour: '2-digit',
59 minute: '2-digit',
60 });
61}
62
63// Format relative time
64export function formatRelativeTime(dateStr: string): string {

Callers 2

SessionDetailFunction · 0.90
TraceDetailFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected