MCPcopy Create free account
hub / github.com/SagerNet/sing-box-dashboard / formatDateTime

Function formatDateTime

src/api/format.ts:79–81  ·  view source on GitHub ↗
(timestampMs: number, locale?: string)

Source from the content-addressed store, hash-verified

77 if (minutes < 60) {
78 return `${minutes}m ${Math.round(seconds % 60)}s`;
79 }
80 const hours = Math.floor(minutes / 60);
81 return `${hours}h ${minutes % 60}m`;
82}
83
84export function formatUptime(startedAtMs: number, nowMs: number): string {

Callers 2

ServerUptimeFunction · 0.90
ConnectionDetailBodyFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected