From a5d8c2acc5a8c6417d3f8eb82e589e10f9026f34 Mon Sep 17 00:00:00 2001 From: Jesse Date: Thu, 5 Dec 2024 12:51:18 -0500 Subject: [PATCH] snooze fri 5 --- ToDoDynalistApp.html | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ToDoDynalistApp.html b/ToDoDynalistApp.html index 2b6374e..17eca03 100644 --- a/ToDoDynalistApp.html +++ b/ToDoDynalistApp.html @@ -150,7 +150,14 @@ newInnerHtml += ``; newInnerHtml += ``; newInnerHtml += ``; + var nowObj = new Date(); var nowStamp = new Date().getTime(); + + var nextFri = dayjs(); + nextFri = nextFri.add(1, 'day'); + while (nextFri.day() != 5) nextFri = nextFri.add(1, 'day'); + var nextfd = nextFri.toDate(); + for (const toDo of toDos.tasks) { var fontvw = (3 / (((nowStamp - toDo.dated) / (dayMs)) + 1)) + 0.6; var styleType = `style="font-size: ${fontvw}vw;vertical-align:middle;" type="button"` @@ -176,17 +183,18 @@ if (snoozed) { styleType = `style="font-size: ${fontvw}vw;background: #ffffff" type="button"` newInnerHtml += ``; - newInnerHtml += `(will unsnooze ${dayjs((snoozeTill)).fromNow()})`; + newInnerHtml += `(will unsnooze ${dayjs((snoozeTill)).fromNow()} - ${new Date(snoozeTill)})`; } else { styleType = `style="font-size: ${fontvw}vw;background: #ccccff" type="button"` newInnerHtml += ``; if (new Date().getHours() < 17) { - var nowObj = new Date(); var ms5p = new Date(nowObj.getFullYear(), nowObj.getMonth(), nowObj.getDate(), 12 + 5).getTime() - nowObj.getTime(); newInnerHtml += ``; } else { newInnerHtml += ``; } + var msf = new Date(nextfd.getFullYear(), nextfd.getMonth(), nextfd.getDate(), 12 + 5).getTime() - nowObj.getTime(); + newInnerHtml += ``; newInnerHtml += ``; newInnerHtml += ``; }