Better display of dates

This commit is contained in:
kramo
2023-04-16 13:42:18 +02:00
parent 16956d214b
commit 7eb7248b4c

View File

@@ -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]