[sleeplog] Correct deleteBefore function

pull/2679/head
Scharf 2023-04-05 17:03:37 +02:00
parent 00a9db1bf0
commit 7740ab87c2
1 changed files with 3 additions and 1 deletions

View File

@ -105,7 +105,9 @@ function deleteBefore(dateString) {
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
print(date < ` + date + `)
if (date < ` + date + `) {
require("Storage").erase(file)
}
})`, () => {
Util.hideModal();
callback();