From ccc4de81b6f177e5af763666df2b0b191808b547 Mon Sep 17 00:00:00 2001 From: Arif Hasanic Date: Mon, 25 May 2026 16:26:32 +0200 Subject: [PATCH] being a wee bit toxic --- src/components/Flatastic/Flatastic.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/Flatastic/Flatastic.tsx b/src/components/Flatastic/Flatastic.tsx index 1615215..23d5674 100644 --- a/src/components/Flatastic/Flatastic.tsx +++ b/src/components/Flatastic/Flatastic.tsx @@ -12,9 +12,18 @@ function choreItem(chore: FlatasticChore, idToNameMap: Record) { className = "irregular"; } else { className = chore.timeLeftNext <= 0 ? "due" : "notDue"; + + const timeInDays = Math.abs(chore.timeLeftNext) / (60 * 60 * 24) + 1; + + console.log(chore.title, timeInDays); + + const grubers = Math.floor(timeInDays / 100); + const days = Math.floor(timeInDays % 100); + timeLeftInDays = ( - {Math.abs(Math.floor(chore.timeLeftNext / (60 * 60 * 24)))}d + {grubers > 0 && `${grubers} gruber${grubers > 1 ? "s" : ""} `} + {days > 0 && `${days} d`} ); }