MCPcopy Index your code
hub / github.com/simstudioai/sim / formatTime

Function formatTime

packages/utils/src/formatting.ts:113–119  ·  view source on GitHub ↗
(date: Date)

Source from the content-addressed store, hash-verified

111 * @returns A formatted time string in the format "h:mm A"
112 */
113export function formatTime(date: Date): string {
114 return date.toLocaleString('en-US', {
115 hour: 'numeric',
116 minute: '2-digit',
117 hour12: true,
118 })
119}
120
121/**
122 * Format a time with seconds and timezone

Callers 2

utils.test.tsFile · 0.90
formatting.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected