MCPcopy Create free account
hub / github.com/codeHappyDananx/SpecWave / formatTimestamp

Function formatTimestamp

electron/main.js:1060–1069  ·  view source on GitHub ↗
(date)

Source from the content-addressed store, hash-verified

1058}
1059
1060function formatTimestamp(date) {
1061 const year = date.getFullYear()
1062 const month = padNumber(date.getMonth() + 1, 2)
1063 const day = padNumber(date.getDate(), 2)
1064 const hours = padNumber(date.getHours(), 2)
1065 const minutes = padNumber(date.getMinutes(), 2)
1066 const seconds = padNumber(date.getSeconds(), 2)
1067 const millis = padNumber(date.getMilliseconds(), 3)
1068 return `${year}${month}${day}-${hours}${minutes}${seconds}-${millis}`
1069}
1070
1071function createUniqueImageName(dirPath, prefix) {
1072 const stamp = formatTimestamp(new Date())

Callers 1

createUniqueImageNameFunction · 0.85

Calls 1

padNumberFunction · 0.85

Tested by

no test coverage detected