From f0b77b1a041ae610e14319420f272984d9549678 Mon Sep 17 00:00:00 2001 From: Joris Date: Mon, 6 Jun 2022 15:22:13 +0200 Subject: Add space between amount and unit Also use `min` instead of `m` for minutes. `m` is for meters. --- todo/gui/tasks/table/widget.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/todo/gui/tasks/table/widget.py b/todo/gui/tasks/table/widget.py index e374c90..3d4bfe6 100644 --- a/todo/gui/tasks/table/widget.py +++ b/todo/gui/tasks/table/widget.py @@ -228,13 +228,13 @@ def item(text: str): def age_since(timestamp): diff = int(time.time()) - timestamp if diff >= 60 * 60 * 24: - return "" + str(math.floor(diff / 60 / 60 / 24)) + "j" + return "" + str(math.floor(diff / 60 / 60 / 24)) + " j" elif diff >= 60 * 60: - return "" + str(math.floor(diff / 60 / 60)) + "h" + return "" + str(math.floor(diff / 60 / 60)) + " h" elif diff >= 60: - return "" + str(math.floor(diff / 60)) + "m" + return "" + str(math.floor(diff / 60)) + " min" else: - return "1m" + return "1 min" def due_date_color(d: date) -> QtGui.QColor: if d != None: -- cgit v1.2.3