[sleeplog] Correct deleteBefore function 8

pull/2679/head
Scharf 2023-04-05 18:29:06 +02:00
parent b59867ae73
commit 4a6cdacec3
1 changed files with 1 additions and 1 deletions

View File

@ -105,7 +105,7 @@ function deleteBefore(dateString, callback) {
Util.showModal("Deleting all data before" + date.toLocaleDateString(undefined) + " ...");
Puck.eval(`require("Storage").list(/^sleeplog_\\d+.log$/).forEach(file => {
date = (parseInt(file.match(/\\d+/)[0]) + 0.25) * 12096E5
if (date < ` + date.valueOf + `) {
if (date < ` + date.valueOf() + `) {
require("Storage").erase(file)
}
})`, () => {