(date)
| 1058 | } |
| 1059 | |
| 1060 | function 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 | |
| 1071 | function createUniqueImageName(dirPath, prefix) { |
| 1072 | const stamp = formatTimestamp(new Date()) |
no test coverage detected