MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / formatDateForFilename

Function formatDateForFilename

src/settings/backupRestore.js:128–135  ·  view source on GitHub ↗

* Formats a date for backup filename * @param {Date} date * @returns {string}

(date)

Source from the content-addressed store, hash-verified

126 * @returns {string}
127 */
128function formatDateForFilename(date) {
129 const year = date.getFullYear();
130 const month = String(date.getMonth() + 1).padStart(2, "0");
131 const day = String(date.getDate()).padStart(2, "0");
132 const hours = String(date.getHours()).padStart(2, "0");
133 const minutes = String(date.getMinutes()).padStart(2, "0");
134 return `${year}${month}${day}_${hours}${minutes}`;
135}
136
137function backupRestore() {
138 const title =

Callers 1

backupFunction · 0.85

Calls 1

StringInterface · 0.85

Tested by

no test coverage detected