From 7eb7248b4c8f77c43f121421853fe0de377765d2 Mon Sep 17 00:00:00 2001 From: kramo <93832451+kra-mo@users.noreply.github.com> Date: Sun, 16 Apr 2023 13:42:18 +0200 Subject: [PATCH] Better display of dates --- src/window.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/window.py b/src/window.py index b147f43..d1cbe06 100644 --- a/src/window.py +++ b/src/window.py @@ -258,7 +258,9 @@ class CartridgesWindow(Adw.ApplicationWindow): return _("Yesterday") if (datetime.datetime.today() - date).days < 8: return GLib.DateTime.new_from_unix_utc(timestamp).format("%A") - return GLib.DateTime.new_from_unix_utc(timestamp).format("%x") + if (datetime.datetime.today() - date).days < 335: + return GLib.DateTime.new_from_unix_utc(timestamp).format("%B") + return GLib.DateTime.new_from_unix_utc(timestamp).format("%Y") def show_details_view(self, _widget, game_id): current_game = self.games[game_id]