MCPcopy Index your code
hub / github.com/scriptscat/scriptcat / formatUnixTime

Function formatUnixTime

src/pkg/utils/day_format.ts:12–16  ·  view source on GitHub ↗
(time: number)

Source from the content-addressed store, hash-verified

10// }
11
12export function formatUnixTime(time: number) {
13 // return dayjs.unix(time).format("YYYY-MM-DD HH:mm:ss");
14 const date = new Date(time * 1000);
15 return dayFormat(date, "YYYY-MM-DD HH:mm:ss");
16}
17
18const formatRe = /YYYY|MM|DD|HH|mm|ss/g;
19

Callers 3

ScriptSettingFunction · 0.90
LoggerPageFunction · 0.90
ToolsFunction · 0.90

Calls 1

dayFormatFunction · 0.85

Tested by

no test coverage detected