* Formats a date for backup filename * @param {Date} date * @returns {string}
(date)
| 126 | * @returns {string} |
| 127 | */ |
| 128 | function 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 | |
| 137 | function backupRestore() { |
| 138 | const title = |